Search code examples
c#.netcakebuild

Exists a way to configure cake so it uses inside DotNetCorePublishSettings the switch self contained


MSBuild has a switch "--self-contained" what publishes also the used .NET framework. So cake has a Function "DotNetCorePublish". Exists any way to set up that function so it delivers also the framework?


Solution

  • Looks like you're looking for DotNetPublishSettings.SelfContained:

    var settings = new DotNetPublishSettings
    {
        SelfContained = true,
        // ...
    };
    
    DotNetPublish("./src/*", settings);