Skip to content

Help with using DotNetCorePublisher with the configurator #3491

Answered by augustoproiete
nick5454 asked this question in Q&A
Discussion options

You must be logged in to vote

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.:

dotnet publish -p:PublishProfile=profile

With Cake you would do the same using the DotNetCorePublish alias including the PublishProfile (or PublishProfileFullPath if using custom path) via an MSBuild property using WithProperty.

DotNetCorePublish("./src/Project/Project.csproj", new DotNetCorePublishSettings
{
    // ...

    MSBuildSettings = new DotNetCoreMSBuildSettings()
        .WithProperty("PublishProfile", folderProfile)
    });
});

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@nick5454
Comment options

Answer selected by nick5454
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants