SLaks / Rebracer

Saves editor formatting settings as part of each solution.
http://visualstudiogallery.msdn.microsoft.com/410e9b9f-65f3-4495-b68e-15567e543c58
44 stars 15 forks source link

Resolved issues #22, #27, #30, #31 #32

Closed patrik-pis closed 1 year ago

patrik-pis commented 7 years ago

Resolved issue #31: Exception from HRESULT: 0x80020003 (DISP_E_MEMBERNOTFOUND) while settings file is readed and applied. This error occurs when property value is read-only.

Resolved issue #30: Exception from HRESULT: 0x80070057 (E_INVALIDARG) while settings file is readed and applied. This error occurs when the IDE property does not exist at this time. Non-existent properties are removed from the settings file.

Resolved issue #27: Exception from HRESULT: 0x80070057 (E_INVALIDARG) while settings file is readed and applied. This error occurs when the IDE property does not exist at this time. Non-existent properties are removed from the settings file.

Resolved issue #22: Added support for ancestor folder location for Rebracer.xml. Rebracer file is searched from solution folder to root of solution folder drive.

Tested under VS 2017.

akrysan commented 7 years ago

Latest rebracer release 1.5 doesn't work for me under Visual Studio 2017 version 15.2. Settings for some reason is not loading. Under VS 2015 I didn't have any problem. Looks like this PR can resolve issue. Please @SLaks accept it and release new version.

When Visual Studio starting I can see in the log

8/3/2017 3:16:22 PM: Rebracer: Creating user settings file to store current global settings

But global settings file C:\Users\akrys\AppData\Roaming\Microsoft\VisualStudio\15.0_62c5f629\Rebracer.xml didn't appear.

akrysan commented 7 years ago

@patrik-pis you are removing settings from rebracer.xml file in case VS doesn't support this key any more. I think this is wrong logic. On the same project can work a couple of developers with different version of VS. For example key PlaceOpenBraceOnNewLineForFunctions was renamed to PlaceOpenBraceOnNewLineForFunctionsAndClasses. And we should keep both settings to be compatible with both VS versions.

patrik-pis commented 7 years ago

This is given by the angle of view. From my point of view and my practice in one project, everyone uses the same version of VS because different versions have different capabilities and support different language constructions. It's also not easy to determine which settings no longer exist and which exist in another VS version. So, this feature always keeps in the Rebracer.xml file only existing and valid settings for the project.