Help with using DotNetCorePublisher with the configurator #3491
-
I slightly confused on using the DotNetCore.Publish as it doesn't seem to be the same as MSBuild I need to do some with properties to add a "PublishProfile" property to the call. Does that runner support the code flow like MSBuild below? Here's the syntax below that i'm after |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The dotnet publish -p:PublishProfile=profile With Cake you would do the same using the DotNetCorePublish("./src/Project/Project.csproj", new DotNetCorePublishSettings
{
// ...
MSBuildSettings = new DotNetCoreMSBuildSettings()
.WithProperty("PublishProfile", folderProfile)
});
}); |
Beta Was this translation helpful? Give feedback.
The
dotnet publish
command doesn't expose an argument to pass in a publish profile, so you have to pass it as a property the same way you would do with MSBuild. e.g.:With Cake you would do the same using the
DotNetCorePublish
alias including thePublishProfile
(orPublishProfileFullPath
if using custom path) via an MSBuild property usingWithProperty
.