Closed sfwester closed 1 year ago
My question is, why is it relevant to add --os
in the settings? And what are your expectations from this setting?
If you need to use particular target os for the build, you might as well run build.ps1 or build.sh accordingly.
Just to be sure we are are on the same page I am advocating adding the option to the DotNetPublishSettings
class. The dotnet CLI already supports this option.
Specifies the target operating system (OS). This is a shorthand syntax for setting the Runtime Identifier (RID), where the provided value is combined with the default RID. For example, on a win-x64 machine, specifying --os linux sets the RID to linux-x64. If you use this option, don't use the -r|--runtime option. Available since .NET 6.
We use this option to output a windows executable even though we build on a unix box so I don't think calling build.ps1 will help me in this case.
However, reading the docs quoted above, it looks like I can get away with using the Runtime
option in DotNetPublishSettings
. May still be worth adding Os
to get feature parity with the CLI.
:tada: This issue has been resolved in version v3.1.0 :tada:
The release is available on:
Your GitReleaseManager bot :package::rocket:
Prerequisites
Cake runner
Cake Frosting
Cake version
3.0.0
Operating system
Windows
Operating system architecture
64-Bit
CI Server
No response
What are you seeing?
Using dotnet version:
when I run
I get an option to set the the target operating system.
However, DotNetPublishSettings.cs does not provide access to the option. (DotnetMSBuildSettings.cs does not either).
What is expected?
I should be able to set the target OS using the
DotNetPublishSettings
. e.g,Steps to Reproduce
does not compile.
Output log