Issue with building solution filters (.slnf) using MsBuild. #4408
Unanswered
DmytroKukharuk
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi. It seems that
MSBuildRunnerpopulates arguments incorrectly when building a solution filter file. As the extension.slnfends with an s, theGetArgumentsmethod identifies it as a.csprojfile, but not as a solution. Therefore, theGetPlatformNamemethod returns an incorrect result.cake/src/Cake.Common/Tools/MSBuild/MSBuildRunner.cs
Line 98 in 124704e
As a result, the build fails with an error indicating that it cannot find the "Release|AnyCPU" configuration.
Error MSB4126: The specified solution configuration "Release|AnyCPU" is invalid. Please specify a valid solution configuration using the Configuration and Platform properties (e.g. MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform="Any CPU") or leave those properties blank to use the default solution configuration.Proposed fix: Replace
string.EqualswithprojectFile.GetExtension().StartsWith(".sln", StringComparison.OrdinalIgnoreCase).Beta Was this translation helpful? Give feedback.
All reactions