Reputation: 175
I need 1 version of build for each os (win-32, win-64, Linux). From the Visual Studio, you can choose when to publish: framework dependent and portable. But I need to do it on Jenkins.
I tried use command:
dotnet publish myapp.csproj --self-contained false --configuration Release --runtime ??? --output "С:\myapp"
but runtimes: "any", "portable" does not work.
How VS build with params framework dependent and portable? I did not use MSBuild, dotnet build, or dotnet MSBuild because publish command adds some unique files(web.config, resources) and remove unuseful(dep*.json).
Upvotes: 5
Views: 7106
Reputation: 9839
you can find a list of all runtimes here runtime.json. Taken from .NET Core RID (Runtime Identifier Catalog) Catalog.
e.g.
dotnet publish myapp.csproj --self-contained false --configuration Release --runtime "alpine.3.7" --output "С:\myapp_alpine_3_7"
dotnet publish myapp.csproj --self-contained false --configuration Release --runtime "linuxmint.19.2-x64" --output "С:\myapp_linuxmint_19_2_x64"
Upvotes: 1