3F / MvsSln

🧩 Customizable VisualStudio .sln parser with project support (.vcxproj, .csproj., …). Pluggable lightweight r/w handlers at runtime, and more …
MIT License
135 stars 27 forks source link

Allow '.' character in solution/project configuration name by improving code that determines the project configuration properties #13

Closed wouterroos closed 5 years ago

wouterroos commented 5 years ago

https://github.com/3F/MvsSln/blob/97896c4ceec97edd76b303a337a6e4e2f553fd67/MvsSln/Core/SlnHandlers/LProjectConfigurationPlatforms.cs#L92

Current implementation looks ahead for '.' characters to isolate the various properties for a project configuration. However, the '.' is, as far as I know, a valid character for a solution/project configuration name. The current code breaks functionality when including a '.' in a solution/project name, resulting in the configuration item no longer being properly retrieved when querying the solution.

3F commented 5 years ago

Thanks for the report!

From VS2010 I remember VS bug for the equal sign =. When VS allows you to set inside IDE such as CI=Debug then it finally destroys any records about this configuration at all :)

But yes, seems I forgot about possible . ~

.Debug.x64.x86|Any.CPU.etc.ActiveCfg = Debug.x64.x86|Any.CPU.etc

Looks like the right way now to go from = like in LSolutionConfigurationPlatforms: https://github.com/3F/MvsSln/blob/97896c4ceec97edd76b303a337a6e4e2f553fd67/MvsSln/Core/SlnHandlers/LSolutionConfigurationPlatforms.cs#L69-L77

I'll review this part later. PR is welcomed too.

3F commented 5 years ago

c68e79c Updates format as follow:

[Projects Guid]                        [Solution pair]     [ltype]     [Project pair]
{A7BF1F9C-F18D-423E-9354-859DC3CFAFD4}.CI_Release|Any CPU.ActiveCfg = Release|Any CPU   - available configuration
{A7BF1F9C-F18D-423E-9354-859DC3CFAFD4}.CI_Release|Any CPU.Build.0 = Release|Any CPU     - active Build (this line exists only when this flag is true)
{A7BF1F9C-F18D-423E-9354-859DC3CFAFD4}.CI_Release|Any CPU.Deploy.0 = Release|Any CPU    - active Deployment (this line exists only when this flag is true)

Possible symbols for Solution/Project pair includes `.` and `=`:
https://github.com/3F/MvsSln/issues/13

-_- awesome format as follow:
{A7BF1F9C-F18D-423E-9354-859DC3CFAFD4}.Debug.x64.x86|Any.CPU.etc.Build.0 = Debug.x64.x86|Any.CPU.etc
\___________________________________/  \___________/ \_________/ \_____/ ^ \___________/ \_________/

For `=` we will not support this due to errors by VS itself (VS bug from VS2010 to modern VS2019)
https://github.com/3F/MvsSln/issues/13#issuecomment-501346079

2.3 will be released today or tomorrow

@wouterroos Please check this out before public release

3F commented 5 years ago

By the way, I leaved processing of .0 as is: https://github.com/3F/MvsSln/blob/c68e79c0e83401ffd9c468b47a93b3b832b199e7/MvsSln/Core/SlnHandlers/LProjectConfigurationPlatforms.cs#L175-L181

Because as I understand, MS just puts this as Build.0 or Deploy.0. And I don't think that ~Build . 0 is possible too.

Comment this if needed.

wouterroos commented 5 years ago

@3F Looks great.