3F/MvsSln

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

wouterroos opened this issue · 4 comments

public override bool Positioned(ISvc svc, RawText line)

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

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:

string left = _line.Before('=')?.Trim(); // Debug|Win32 = Debug|Win32
if(left == null
|| String.Compare(left, "DESCRIPTION", StringComparison.OrdinalIgnoreCase) == 0)
{
LSender.Send(this, $"Solution Configuration has been ignored for line '{_line}'", Message.Level.Debug);
continue;
}
string[] cfg = left.Split('|');

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

3F commented

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

By the way, I leaved processing of .0 as is:

int rpos = raw.LastIndexOf('.', splitter); // .ActiveCfg =
// .Build.0 =
// ------^
if(splitter - rpos == 2) { // .0
rpos = raw.LastIndexOf('.', rpos - 1);
}

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.

@3F Looks great.