chocolatey / Chocolatey.Cake.Recipe

A set of convention based Cake scripts for building Chocolatey projects
Apache License 2.0
5 stars 9 forks source link

No build platform target is provided when invoking XBuild #86

Closed gep13 closed 1 year ago

gep13 commented 1 year ago

As a result, when running the build on a non Windows system, the output folder for the generated files is not the same as when running on a Windows system.

For example, the output folder is:

bin/x86/ReleaseOfficial

rather than:

bin/ReleaseOfficial

This causes a problem on the chocolatey/choco repository, since there is an expectation that the output files are in a known location. When generating the POSIX artifacts, the builds are currently failing due to this problem.

We should create a ToolSetting for XBuild similar to the following:

https://github.com/chocolatey/Chocolatey.Cake.Recipe/blob/9119c76b1834aa8d0339dd78fdf54cbdd7d1e769/Chocolatey.Cake.Recipe/Content/toolsettings.cake#L84

So that we can rely on exactly where the output files will reside. This new setting should default to Any CPU, and be passed into the XBuildSettings using the WithProperty alias.