public bool Publish(Context context, DotnetPublishOptions dotnetPublishOptions) { var argumentList = new List <string> { "publish", "-c Release", $"-r {dotnetPublishOptions.Rid ?? PlatformToRid[context.CurrentPlatform]}", $"-o {context.TempPublishPath.WithQuotes()}" }; if (dotnetPublishOptions.IsNoRootApplicationAssemblies) { argumentList.Add("/p:RootAllApplicationAssemblies=false"); } if (dotnetPublishOptions.IsNoCrossGen) { argumentList.Add("/p:CrossGenDuringPublish=false"); } argumentList.AddRange(_msbuildProperties.Select(prop => $"/p:{prop}")); argumentList.Add($"{_projectPath.WithQuotes()}"); var isCommandSuccessful = RunCommand(argumentList, _isVerbose); if (isCommandSuccessful) { context.FindAssemblyName(); } return(isCommandSuccessful); }
public bool Publish(Context context, DotnetPublishOptions dotnetPublishOptions) { var argumentList = new List <string> { "publish", "-c Release", $"-r {dotnetPublishOptions.Rid ?? PlatformToRid[context.CurrentPlatform]}", $"-o {context.TempPublishPath.WithQuotes()}", "/p:ShowLinkerSizeComparison=true" }; if (dotnetPublishOptions.IsNoRootApplicationAssemblies) { argumentList.Add("/p:RootAllApplicationAssemblies=false"); } if (dotnetPublishOptions.IsNoCrossGen) { argumentList.Add("/p:CrossGenDuringPublish=false"); } argumentList.Add($"{_projectPath.WithQuotes()}"); var isCommandSuccessful = RunCommand(argumentList, _isVerbose); UpdateContext(context); return(isCommandSuccessful); }