-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Solution parser fails when projects have similar names #3019
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@rainersigwald Jumping in here... Our project is blocked by this as we rely on AppVeyor to do CI and CMake generates project names exactly like this... Do you have a workaround on this issue? Many thanks! |
@rainersigwald I can see 2 solutions here. Based on your experience, which one is better and has less impact? (or if you have another one)
|
@joseotavioq Unfortunately both have compat impact: either way we'd break people's build command lines that build on the current The only way I can think of that doesn't have that impact is to detect collisions caused solely by normalization and normalize in a different way somehow. |
@rainersigwald I am trying to figure out a solution to this issue. I am thinking about generating the unique name concatenating the repeated normalized project name with the project Guid. For example:
What do you think about it? However, when I was thinking about this solution, the following case came to me: We have 2 projects with the same name that are going to be normalized.
What should we do in this case?
|
I think it makes sense to support multiple colliding project names with their GUID suffix. I would do it for all three of the normalized project names in your example 1. Doing so would require that |
And what about the duplicated projects? In the example above, I showed two projects with the same non-normalized name (Project.Named.With.Dots) in the SLN file. |
@joseotavioq I'm fine with leaving that as an error per #530. But if you wanted to use the disambiguation code needed for this to fix that too, I think it'd be helpful. All of this is more helpful for folk who just build solutions--I don't imagine too many people will be typing |
Hey @rainersigwald, I created a draft PR #5367. Could you please review the solution and see if it solves the problem? |
I use But is there any possible way to change Project('{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}') = 'Project.Named.With.Dots.Alias1', 'Project.Named.With.Dots.csproj', '{FC2889D9-6050-4D2E-B022-979CCFEEAAAC}'
EndProject
Project('{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}') = 'Project_Named_With_Dots', 'Project_Named_With_Dots.csproj', '{ED30D4A3-1214-410B-82BB-B61E5A9D05CA}'
EndProject
Project('{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}') = 'Project.Named.With.Dots.Alias2', 'Project.Named.With.Dots.csproj', '{6185CC21-BE89-448A-B3C0-D1C27112E595}'
EndProject Is this even possible with VS or MSBuild? |
Steps to reproduce
Attempt to build this solution:
Expected behavior
Successful build.
Actual behavior
Environment data
msbuild /version
output:Microsoft (R) Build Engine version 15.5.180.51428 for .NET Framework
(Related to #530 but different since the solution is entirely valid here and the conflict is within MSBuild.)
The text was updated successfully, but these errors were encountered: