add includesymbols and includesource to pack3 command as symbols package is not created by default (#4193)
This commit is contained in:
parent
c255b3ed3e
commit
bf8b588e8b
1 changed files with 16 additions and 0 deletions
|
@ -30,6 +30,12 @@ namespace Microsoft.DotNet.Tools.Pack3
|
||||||
var noBuild = cmd.Option("--no-build",
|
var noBuild = cmd.Option("--no-build",
|
||||||
"Do not build project before packing",
|
"Do not build project before packing",
|
||||||
CommandOptionType.NoValue);
|
CommandOptionType.NoValue);
|
||||||
|
var includeSymbols = cmd.Option("--include-symbols",
|
||||||
|
"Include PDBs along with the DLLs in the output folder",
|
||||||
|
CommandOptionType.NoValue);
|
||||||
|
var includeSource = cmd.Option("--include-source",
|
||||||
|
"Include PDBs and source files. Source files go into the src folder in the resulting nuget package",
|
||||||
|
CommandOptionType.NoValue);
|
||||||
var configuration = cmd.Option("-c|--configuration <CONFIGURATION>",
|
var configuration = cmd.Option("-c|--configuration <CONFIGURATION>",
|
||||||
"Configuration under which to build",
|
"Configuration under which to build",
|
||||||
CommandOptionType.SingleValue);
|
CommandOptionType.SingleValue);
|
||||||
|
@ -55,6 +61,16 @@ namespace Microsoft.DotNet.Tools.Pack3
|
||||||
msbuildArgs.Add($"/p:NoBuild=true");
|
msbuildArgs.Add($"/p:NoBuild=true");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (includeSymbols.HasValue())
|
||||||
|
{
|
||||||
|
msbuildArgs.Add($"/p:IncludeSymbols=true");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (includeSource.HasValue())
|
||||||
|
{
|
||||||
|
msbuildArgs.Add($"/p:IncludeSource=true");
|
||||||
|
}
|
||||||
|
|
||||||
if (output.HasValue())
|
if (output.HasValue())
|
||||||
{
|
{
|
||||||
msbuildArgs.Add($"/p:PackageOutputPath={output.Value()}");
|
msbuildArgs.Add($"/p:PackageOutputPath={output.Value()}");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue