Allow setting MSBuild target via MSBuildSettings using a string
See original GitHub issueCurrently when calling the MSBuild
alias with an MSBuildSettings
, we need to set the target using the WithTarget
extension method.
MSBuild("./my-app.sln", new MSBuildSettings
{
Configuration = "Release",
ToolVersion = MSBuildToolVersion.VS2019,
}.WithTarget("Build")); // <<<###
It would be nice if we could use a property, with a string, which would make it more natural when using properties for everything else:
MSBuild("./my-app.sln", new MSBuildSettings
{
Target = "Build", // <<<###
Configuration = "Release",
ToolVersion = MSBuildToolVersion.VS2019,
});
This property should also understand semicolons as separator for multiple targets and call Targets.Add
accordingly.
MSBuild("./my-app.sln", new MSBuildSettings
{
Target = "Clean;Build", // <<<###
Configuration = "Release",
ToolVersion = MSBuildToolVersion.VS2019,
});
What version of Cake are you using?
1.0.0-rc0001
Would you be willing to send a PR?
Yes!
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
API - MSBuildSettings Class
Name Value Summary
SetVersion(string) MSBuildSettings Sets the version. From MSBuildSettingsExte...
WithToolPath(FilePath) T Sets the tool path. From ToolSettingsExtensi...
WithToolTimeout(TimeSpan) T Sets the tool timeout. From ToolSettingsExte......
Read more >Cake MSBuild Targets
The WithTarget extension method returns the same instance of the MSBuildSettings with the modifications, it doesn't interact with the current ...
Read more >MSBuild Command-Line Reference
Learn how to use MSBuild.exe command line to build specific targets of specific projects in solutions. Building Multiple Projects in Parallel ...
Read more >Building Applications using Command Line
The MSBuildSettings.xml file consists of all the build details to build and clean the AB Suite application. You can modify the value of...
Read more >Documentation - Compiler Options in MSBuild
Overview. When you have an MSBuild based project which utilizes TypeScript such as an ASP.NET Core project, you can configure TypeScript in two...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@MariaSolOs It’s exactly what the error message says. Your documentation comments have trailing spaces on them that should be removed.
e.g.
🎉 This issue has been resolved in version v2.3.0 🎉
The release is available on:
Your GitReleaseManager bot 📦🚀