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
-
Hi. It seems that
MSBuildRunner
populates arguments incorrectly when building a solution filter file. As the extension.slnf
ends with an s, theGetArguments
method identifies it as a.csproj
file, but not as a solution. Therefore, theGetPlatformName
method 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.Equals
withprojectFile.GetExtension().StartsWith(".sln", StringComparison.OrdinalIgnoreCase)
.Beta Was this translation helpful? Give feedback.
All reactions