Merge pull request #791 from livarcocc/empty_pack
Nuget package missing lib folder when doing dotnet pack --output
This commit is contained in:
commit
2d70ffc508
1 changed files with 13 additions and 4 deletions
|
@ -16,13 +16,16 @@ namespace Microsoft.DotNet.Tools.Pack
|
||||||
|
|
||||||
private bool PackageArtifactsPathSet => !string.IsNullOrWhiteSpace(PackageArtifactsPathParameter);
|
private bool PackageArtifactsPathSet => !string.IsNullOrWhiteSpace(PackageArtifactsPathParameter);
|
||||||
|
|
||||||
|
private bool ShouldCombinePathWithFramework => !CompiledArtifactsPathSet && !PackageArtifactsPathSet;
|
||||||
|
|
||||||
public string CompiledArtifactsPathParameter { get; }
|
public string CompiledArtifactsPathParameter { get; }
|
||||||
|
|
||||||
public string PackageArtifactsPathParameter { get; }
|
public string PackageArtifactsPathParameter { get; }
|
||||||
|
|
||||||
public bool CompiledArtifactsPathSet => !string.IsNullOrWhiteSpace(CompiledArtifactsPathParameter);
|
public bool CompiledArtifactsPathSet => !string.IsNullOrWhiteSpace(CompiledArtifactsPathParameter);
|
||||||
|
|
||||||
public string CompiledArtifactsPath => CompiledArtifactsPathSet ? CompiledArtifactsPathParameter : PackageArtifactsPath;
|
public string CompiledArtifactsPath =>
|
||||||
|
CompiledArtifactsPathSet ? CompiledArtifactsPathParameter : PackageArtifactsPath;
|
||||||
|
|
||||||
public string PackageArtifactsPath
|
public string PackageArtifactsPath
|
||||||
{
|
{
|
||||||
|
@ -42,7 +45,11 @@ namespace Microsoft.DotNet.Tools.Pack
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArtifactPathsCalculator(Project project, string compiledArtifactsPath, string packageArtifactsPath, string configuration)
|
public ArtifactPathsCalculator(
|
||||||
|
Project project,
|
||||||
|
string compiledArtifactsPath,
|
||||||
|
string packageArtifactsPath,
|
||||||
|
string configuration)
|
||||||
{
|
{
|
||||||
_project = project;
|
_project = project;
|
||||||
CompiledArtifactsPathParameter = compiledArtifactsPath;
|
CompiledArtifactsPathParameter = compiledArtifactsPath;
|
||||||
|
@ -52,7 +59,9 @@ namespace Microsoft.DotNet.Tools.Pack
|
||||||
|
|
||||||
public string InputPathForContext(ProjectContext context)
|
public string InputPathForContext(ProjectContext context)
|
||||||
{
|
{
|
||||||
return CompiledArtifactsPathSet ? CompiledArtifactsPath : Path.Combine(CompiledArtifactsPath, context.TargetFramework.GetTwoDigitShortFolderName());
|
return ShouldCombinePathWithFramework ?
|
||||||
}
|
Path.Combine(CompiledArtifactsPath, context.TargetFramework.GetTwoDigitShortFolderName()) :
|
||||||
|
CompiledArtifactsPath;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue