You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29509.3
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp3", "ConsoleApp3\ConsoleApp3.csproj", "{D5F72F13-B7F0-4F67-BDEE-F041D02DC618}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp1", "ConsoleApp1\ConsoleApp1.csproj", "{3DB043B3-7FE4-40F1-A9BA-8987FB252DE7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D5F72F13-B7F0-4F67-BDEE-F041D02DC618}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D5F72F13-B7F0-4F67-BDEE-F041D02DC618}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D5F72F13-B7F0-4F67-BDEE-F041D02DC618}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D5F72F13-B7F0-4F67-BDEE-F041D02DC618}.Release|Any CPU.Build.0 = Release|Any CPU
{3DB043B3-7FE4-40F1-A9BA-8987FB252DE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3DB043B3-7FE4-40F1-A9BA-8987FB252DE7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3DB043B3-7FE4-40F1-A9BA-8987FB252DE7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3DB043B3-7FE4-40F1-A9BA-8987FB252DE7}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A016638C-EF8F-45E3-9A96-32F3E2378AED}
EndGlobalSection
EndGlobal
Notice the project line for ConsoleApp3 misses the EndProject line. But the parser does not fail - instead it skips over the project line for ConsoleApp1 and uses its EndProject to terminate the project line for ConsoleApp3.
You can reproduce it trivially - create a solution with two projects and then delete the first EndProject.
Of course, nobody does it on purpose. But it has happened for us because of a bad Git merge.
Expected behaviour
Building the solution on the command line with msbuild fails, because of the malformed solution file.
Actual behaviour
The project ConsoleApp1 simply not built.
In our case this was a unit test project, so the fact it was not built was not caught right away, because:
The solution overall cleanly builds and runs (unit test projects have no effect here)
The project in question does build cleanly inside Visual Studio, because the latter does not parse the solution file using msbuild.
P.S.
It would have been nice, though, if the VS IDE warned about the malformed solution file.
The text was updated successfully, but these errors were encountered:
So the Visual Studio IDE experience is as though it silently added an EndProject when encountering a new Project(... line? That's unfortunate, but MSBuild should match the VS behavior.
rainersigwald
added
the
help wanted
Issues that the core team doesn't plan to work on, but would accept a PR for. Comment to claim.
label
Jan 6, 2020
benvillalobos
removed
the
help wanted
Issues that the core team doesn't plan to work on, but would accept a PR for. Comment to claim.
label
Oct 14, 2020
Steps to reproduce
Solution file
Notice the project line for ConsoleApp3 misses the
EndProject
line. But the parser does not fail - instead it skips over the project line for ConsoleApp1 and uses itsEndProject
to terminate the project line for ConsoleApp3.You can reproduce it trivially - create a solution with two projects and then delete the first EndProject.
Of course, nobody does it on purpose. But it has happened for us because of a bad Git merge.
Expected behaviour
Building the solution on the command line with msbuild fails, because of the malformed solution file.
Actual behaviour
The project ConsoleApp1 simply not built.
In our case this was a unit test project, so the fact it was not built was not caught right away, because:
P.S.
It would have been nice, though, if the VS IDE warned about the malformed solution file.
The text was updated successfully, but these errors were encountered: