Last active
November 28, 2019 17:25
-
-
Save kzu/11ab0e85bdf9b255c35d062c36c2269e to your computer and use it in GitHub Desktop.
Include nuget package reference assets in VSIX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project> | |
<Target Name="IncludePackageReferenceInVSIX" | |
Condition="$(CI)" | |
Inputs="@(PackageReference -> WithMetadataValue('IncludeInVSIX', 'true'))" | |
Outputs="%(PackageReference.Identity)" | |
DependsOnTargets="ResolvePackageAssets" | |
AfterTargets="ResolveReferences"> | |
<PropertyGroup> | |
<IncludeInVSIXPackageId>%(PackageReference.Identity)</IncludeInVSIXPackageId> | |
</PropertyGroup> | |
<ItemGroup> | |
<VSIXSourceItem Include="@(RuntimeCopyLocalItems);@(RuntimeTargetsCopyLocalItems)" | |
Condition="'%(NuGetPackageId)' == '$(IncludeInVSIXPackageId)'" /> | |
</ItemGroup> | |
</Target> | |
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project> | |
<ItemGroup> | |
<PackageReference Include="Foo" Version="1.0.0" IncludeInVSIX="true" /> | |
</ItemGroup> | |
</Project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment