var configuration = Argument("configuration", "Release");
var runtime = Argument("app-runtime", "win-x64");
var selfContained = Argument<bool>("app-self-contained", false);
Task("Publish")
.Does(() =>
{
DotNetPublish("./Source/Project.csproj", new DotNetPublishSettings
{
NoRestore = true,
OutputDirectory = "./Setup/Files",
Configuration = configuration,
Runtime = runtime,
SelfContained = selfContained,
});
});
Executing task: Publish
Resolved tool to path C:/Program Files/dotnet/dotnet.exe
Executing: "C:/Program Files/dotnet/dotnet.exe" publish "./Source/Project.csproj" --output "F:/<omitted>/Setup/Files" --runtime win-x64 --configuration Release --no-restore --self-contained false
Prerequisites
Cake runner
Cake .NET Tool
Cake version
6.0.0
Operating system
Windows
Operating system architecture
x64
CI Server
No response
What are you seeing?
According to the sources mentioned below and this comment we should be using
--no-self-containedinstead of--self-contained falseto publish framework-dependent applications.In the official dotnet publish docs, the
--self-contained falseargument has been mentioned only once (just in the examples) and it's usage seems discouraged.See Also:
What is expected?
The
--self-containedand--no-self-containedarguments should be used.Steps to Reproduce
Output log