Created
June 2, 2020 20:06
-
-
Save jnm2/94ff56a2cbc95279d155ec542fd6f0ed to your computer and use it in GitHub Desktop.
For when you need refout rather than refonly two produce two artifacts: a ref assembly NuGet package, and a non-NuGet distribution mechanism for the lib assembly.
This file contains hidden or 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 Sdk="Microsoft.NET.Sdk"> | |
<!-- ... --> | |
<!-- Ref assembly NuGet packaging --> | |
<PropertyGroup> | |
<ProduceReferenceAssembly>true</ProduceReferenceAssembly> | |
<BuildOutputTargetFolder>ref</BuildOutputTargetFolder> | |
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);UseRefAssemblyAsBuildOutputInPackage</TargetsForTfmSpecificBuildOutput> | |
</PropertyGroup> | |
<Target Name="UseRefAssemblyAsBuildOutputInPackage"> | |
<ItemGroup> | |
<BuiltProjectOutputGroupOutput Remove="@(BuiltProjectOutputGroupOutput)" /> | |
<BuildOutputInPackage Include="@(IntermediateRefAssembly)" /> | |
</ItemGroup> | |
</Target> | |
</Project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment