-
Notifications
You must be signed in to change notification settings - Fork 363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DotNetPublishSettings lacks some arguments #1350
Comments
@ArwynFr Could you please share your csproj.. I do not understand the Edit: As of this documentation the only possibility is So, probably we just could make it paramterless, don't we? |
@ITaluone I've made some further investigations. Basically dotnet-cli is a wrapper around other MS tools, espacially msbuild.dll, which is a .NET5+ port of the old legacy MsBuild.exe. The
My tests have shown that you can use three different syntax for this feature at the dotnet cli level:
The What targets are available is very complex though. Some targets come directly from the framework (Restore, Build, Publish). Some targets depend on the Sdk used: Microsoft.NET.Sdk, Microsoft.NET.Sdk.Web, ... Some targets are added by nuget packages, espacially packages involved in testing for instance. Also, developpers can directly add custom target in their csproj. Parsing targets are probably gonna be a pain to do and are beyond the scope of nuke in my opinion. I would say you have two valid options:
|
I would go with both |
Any update ? |
Usage Information
NUKE version 8.0.0 / SDK version 8.0.200 / net 8.0 / Win 10 21H2 LTSC
Description
Some arguments of the dotnet publish command are missing from the fluent API, especially
--os
and--arch
. Also you can't provide a custom build target. This feature is especially missing when using dotnet publish to push a docker image to a registry.These options are probably missing on other commands such as pack/build.
Sources:
https://learn.microsoft.com/en-us/dotnet/core/docker/publish-as-container?pivots=dotnet-8-0#publish-net-app
https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-publish
Reproduction Steps
Expected Behavior
dotnet publish project --configuration Debug /p:ContainerImageTag=0.1.16 --os linux --arch x64 /t:PublishContainer
Actual Behavior
Compilation error
Regression?
No
Known Workarounds
Could you help with a pull-request?
No
The text was updated successfully, but these errors were encountered: