Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
Do not include dependencies with PrivateAssets="All" in the compiler …
Browse files Browse the repository at this point in the history
…package (#526)

* Ignore PrivateAssets="All" in FindNuspecReferences.ps1

* Remove parentheses
  • Loading branch information
bamarsha authored Jul 21, 2020
1 parent 98c5b89 commit d72b05b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/QsCompiler/Compiler/FindNuspecReferences.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function Add-NuGetDependencyFromCsprojToNuspec($PathToCsproj)

# Check if package already added as dependency, only add if new:
$added = $dep.dependency | Where { $_.id -eq $id }
if (!$added) {
if (!$added -and $_.PrivateAssets -ne "All") {
Write-Host "Adding $id"
$onedependency = $dep.AppendChild($nuspec.CreateElement('dependency', $nuspec.package.metadata.NamespaceURI))
$onedependency.SetAttribute('id', $id)
Expand All @@ -58,4 +58,3 @@ Add-NuGetDependencyFromCsprojToNuspec "Compiler.csproj" $dep
# Save into .nuspec file:
$nuspec.package.metadata.AppendChild($dep)
$nuspec.Save("$PSScriptRoot\Compiler.nuspec")

0 comments on commit d72b05b

Please sign in to comment.