Skip to content

Commit

Permalink
WIP: Fat/Lite Packages (#538)
Browse files Browse the repository at this point in the history
* Added ILMerge back, now with support for .NET core and .NET
* Split MSBuild code into smaller files
* Added Debug/Release Fat/Lite configurations
* Adapted azure pipeline
* Added configuration to the display name
* Switching to ILRepack.FullAuto for a better control of repacking
* Let's test the new ILRepack
  • Loading branch information
Aragas authored Feb 2, 2024
1 parent 1081de9 commit 89d4d9b
Show file tree
Hide file tree
Showing 15 changed files with 463 additions and 287 deletions.
54 changes: 36 additions & 18 deletions Harmony.sln
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,44 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestLibrary", "TestLibrary\
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
ReleaseFat|Any CPU = ReleaseFat|Any CPU
ReleaseLite|Any CPU = ReleaseLite|Any CPU
DebugLite|Any CPU = DebugLite|Any CPU
DebugFat|Any CPU = DebugFat|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{69AEE16A-B6E7-4642-8081-3928B32455DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{69AEE16A-B6E7-4642-8081-3928B32455DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{69AEE16A-B6E7-4642-8081-3928B32455DF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{69AEE16A-B6E7-4642-8081-3928B32455DF}.Release|Any CPU.Build.0 = Release|Any CPU
{DEE74EFC-29A8-4704-8536-7DA38D3999F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DEE74EFC-29A8-4704-8536-7DA38D3999F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DEE74EFC-29A8-4704-8536-7DA38D3999F7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DEE74EFC-29A8-4704-8536-7DA38D3999F7}.Release|Any CPU.Build.0 = Release|Any CPU
{9B9DD18C-6EB7-497F-8ED5-699515A840C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9B9DD18C-6EB7-497F-8ED5-699515A840C5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9B9DD18C-6EB7-497F-8ED5-699515A840C5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9B9DD18C-6EB7-497F-8ED5-699515A840C5}.Release|Any CPU.Build.0 = Release|Any CPU
{11F828EC-7C50-48F4-A30D-9BED06837F3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{11F828EC-7C50-48F4-A30D-9BED06837F3A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{11F828EC-7C50-48F4-A30D-9BED06837F3A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{11F828EC-7C50-48F4-A30D-9BED06837F3A}.Release|Any CPU.Build.0 = Release|Any CPU
{69AEE16A-B6E7-4642-8081-3928B32455DF}.ReleaseFat|Any CPU.ActiveCfg = ReleaseFat|Any CPU
{69AEE16A-B6E7-4642-8081-3928B32455DF}.ReleaseFat|Any CPU.Build.0 = ReleaseFat|Any CPU
{69AEE16A-B6E7-4642-8081-3928B32455DF}.ReleaseLite|Any CPU.ActiveCfg = ReleaseLite|Any CPU
{69AEE16A-B6E7-4642-8081-3928B32455DF}.ReleaseLite|Any CPU.Build.0 = ReleaseLite|Any CPU
{69AEE16A-B6E7-4642-8081-3928B32455DF}.DebugLite|Any CPU.ActiveCfg = DebugLite|Any CPU
{69AEE16A-B6E7-4642-8081-3928B32455DF}.DebugLite|Any CPU.Build.0 = DebugLite|Any CPU
{69AEE16A-B6E7-4642-8081-3928B32455DF}.DebugFat|Any CPU.ActiveCfg = DebugFat|Any CPU
{69AEE16A-B6E7-4642-8081-3928B32455DF}.DebugFat|Any CPU.Build.0 = DebugFat|Any CPU
{DEE74EFC-29A8-4704-8536-7DA38D3999F7}.ReleaseFat|Any CPU.ActiveCfg = ReleaseFat|Any CPU
{DEE74EFC-29A8-4704-8536-7DA38D3999F7}.ReleaseFat|Any CPU.Build.0 = ReleaseFat|Any CPU
{DEE74EFC-29A8-4704-8536-7DA38D3999F7}.ReleaseLite|Any CPU.ActiveCfg = ReleaseLite|Any CPU
{DEE74EFC-29A8-4704-8536-7DA38D3999F7}.ReleaseLite|Any CPU.Build.0 = ReleaseLite|Any CPU
{DEE74EFC-29A8-4704-8536-7DA38D3999F7}.DebugLite|Any CPU.ActiveCfg = DebugLite|Any CPU
{DEE74EFC-29A8-4704-8536-7DA38D3999F7}.DebugLite|Any CPU.Build.0 = DebugLite|Any CPU
{DEE74EFC-29A8-4704-8536-7DA38D3999F7}.DebugFat|Any CPU.ActiveCfg = DebugFat|Any CPU
{DEE74EFC-29A8-4704-8536-7DA38D3999F7}.DebugFat|Any CPU.Build.0 = DebugFat|Any CPU
{9B9DD18C-6EB7-497F-8ED5-699515A840C5}.DebugFat|Any CPU.ActiveCfg = Debug|Any CPU
{9B9DD18C-6EB7-497F-8ED5-699515A840C5}.DebugFat|Any CPU.Build.0 = Debug|Any CPU
{9B9DD18C-6EB7-497F-8ED5-699515A840C5}.DebugLite|Any CPU.ActiveCfg = Debug|Any CPU
{9B9DD18C-6EB7-497F-8ED5-699515A840C5}.DebugLite|Any CPU.Build.0 = Debug|Any CPU
{9B9DD18C-6EB7-497F-8ED5-699515A840C5}.ReleaseFat|Any CPU.ActiveCfg = Release|Any CPU
{9B9DD18C-6EB7-497F-8ED5-699515A840C5}.ReleaseFat|Any CPU.Build.0 = Release|Any CPU
{9B9DD18C-6EB7-497F-8ED5-699515A840C5}.ReleaseLite|Any CPU.ActiveCfg = Release|Any CPU
{9B9DD18C-6EB7-497F-8ED5-699515A840C5}.ReleaseLite|Any CPU.Build.0 = Release|Any CPU
{11F828EC-7C50-48F4-A30D-9BED06837F3A}.DebugFat|Any CPU.ActiveCfg = Debug|Any CPU
{11F828EC-7C50-48F4-A30D-9BED06837F3A}.DebugFat|Any CPU.Build.0 = Debug|Any CPU
{11F828EC-7C50-48F4-A30D-9BED06837F3A}.DebugLite|Any CPU.ActiveCfg = Debug|Any CPU
{11F828EC-7C50-48F4-A30D-9BED06837F3A}.DebugLite|Any CPU.Build.0 = Debug|Any CPU
{11F828EC-7C50-48F4-A30D-9BED06837F3A}.ReleaseFat|Any CPU.ActiveCfg = Release|Any CPU
{11F828EC-7C50-48F4-A30D-9BED06837F3A}.ReleaseFat|Any CPU.Build.0 = Release|Any CPU
{11F828EC-7C50-48F4-A30D-9BED06837F3A}.ReleaseLite|Any CPU.ActiveCfg = Release|Any CPU
{11F828EC-7C50-48F4-A30D-9BED06837F3A}.ReleaseLite|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
12 changes: 6 additions & 6 deletions Harmony/Documentation/Documentation.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,14 @@
<CheckEolTargetFramework>false</CheckEolTargetFramework>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Harmony.csproj" />
</ItemGroup>

<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<Optimize>false</Optimize>
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
<DefineConstants>DEBUG</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release'">
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<Optimize>true</Optimize>
<DebugType>none</DebugType>
<DebugSymbols>false</DebugSymbols>
Expand All @@ -37,4 +33,8 @@
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Harmony.csproj" />
</ItemGroup>

</Project>
156 changes: 27 additions & 129 deletions Harmony/Harmony.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,157 +2,55 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net35;net452;net472;net48;netcoreapp3.0;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Product>Harmony</Product>
<Company>Andreas Pardeike</Company>
<Copyright>Copyright © 2016</Copyright>
<Description>A general non-destructive patch library for .NET and Mono modules</Description>
<PackageId>Lib.Harmony</PackageId>
<Authors>Andreas Pardeike</Authors>
<AssemblyName>0Harmony</AssemblyName>
<SignAssembly>true</SignAssembly>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageProjectUrl>https://github.com/pardeike/Harmony</PackageProjectUrl>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageTags>Harmony,Mono,Patch,Patching,Runtime,Detour,Detours,Aspect,Aspects</PackageTags>
<PackageIcon>HarmonyLogo.png</PackageIcon>
<PackageIconUrl>https://raw.githubusercontent.com/pardeike/Harmony/master/HarmonyLogo.png</PackageIconUrl>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<LogFile>obj/docfx-$(TargetFramework).log</LogFile>

<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>preview</LangVersion>
<AssemblyName>0Harmony</AssemblyName>

<DefaultItemExcludes>$(DefaultItemExcludes);Documentation/**</DefaultItemExcludes>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<NoWarn>$(NoWarn);SYSLIB0011</NoWarn>

<Version>$(HarmonyVersion)</Version>
<AssemblyVersion>$(HarmonyVersion)</AssemblyVersion>
<FileVersion>$(HarmonyVersion)</FileVersion>
<PackageVersion>$(HarmonyVersion)$(HarmonyPrerelease)</PackageVersion>
<InformationalVersion>$(HarmonyVersion)$(HarmonyPrerelease)</InformationalVersion>
<NoWarn>$(NoWarn);NU5131</NoWarn>

<Configurations>ReleaseFat;ReleaseLite;DebugLite;DebugFat</Configurations>

<GenerateDocumentationFile>true</GenerateDocumentationFile>
<LogFile>obj/docfx-$(TargetFramework).log</LogFile>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<NoWarn>$(NoWarn);SYSLIB0011;NU5131</NoWarn>

</PropertyGroup>

<!-- In .NET 5.0 Binary Formatters are off by default. Support is added for .NET 5.0+ for fallback JSON Serialization -->
<Choose>
<When Condition="'$(TargetFramework)'=='net5.0' Or '$(TargetFramework)'=='net6.0' Or '$(TargetFramework)'=='net7.0' Or '$(TargetFramework)'=='net8.0'">
<PropertyGroup>
<IsNET5OrGreater>true</IsNET5OrGreater>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<IsNET5OrGreater>false</IsNET5OrGreater>
</PropertyGroup>
</Otherwise>
</Choose>

<Choose>
<!--
Ideally would check for .NET Core and .NET 5.0+ via TargetFrameworkIdentifier being .NETCoreApp, but that property isn't defined at this point,
so instead, relying on the fact that all .NET Core and .NET 5.0+ (and .NET Standard) have a period in their TFMs.
-->
<When Condition="$(TargetFramework.Contains('.'))">
<PropertyGroup>
<IsCoreOrStandard>true</IsCoreOrStandard>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<IsCoreOrStandard>false</IsCoreOrStandard>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>
</Otherwise>
</Choose>
<Import Project="msbuild\build.props" />

<ItemGroup>
<None Include="..\README.md" Pack="true" PackagePath="" />
<None Include="..\LICENSE" Pack="true" PackagePath="" />
<None Include="..\HarmonyLogo.png" Pack="true" Visible="false" PackagePath="" />
</ItemGroup>
<Import Project="msbuild\variables.props" />

<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<Optimize>false</Optimize>
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
<DefineConstants>DEBUG</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release'">
<Optimize>true</Optimize>
<DebugType>none</DebugType>
<DebugSymbols>false</DebugSymbols>
</PropertyGroup>
<Import Project="msbuild\ilrepack.props" />

<Import Project="msbuild\nuget.props" />

<ItemGroup>
<PackageReference Include="MonoMod.Core" Version="$(MonoModCoreVersion)" />
<PackageReference Include="MonoMod.Core" Version="$(MonoModCoreVersion)">
<PrivateAssets Condition="'$(IsFAT)' == 'true'">all</PrivateAssets>
</PackageReference>
<!-- In .NET 5.0 Binary Formatters are off by default. Support is added for .NET 5.0+ for fallback JSON Serialization -->
<PackageReference Condition="'$(IsNET5OrGreater)' == 'true'" Include="System.Text.Json" Version="5.0.2">
<PrivateAssets Condition="'$(IsFAT)' == 'true'">all</PrivateAssets>
</PackageReference>
<!-- Reference assemblies are needed for non-Windows .NET Framework targeting builds. -->
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="all" />
</ItemGroup>

<!-- netstandard2.0 reference assemblies -->
<PropertyGroup Condition="$(TargetFramework) == 'netstandard2.0'">
<!-- Remove from /lib in NuGet -->
<IncludeBuildOutput>false</IncludeBuildOutput>
<!-- Create reference Assemblies instead of a full assembly -->
<ProduceOnlyReferenceAssembly>true</ProduceOnlyReferenceAssembly>
<!-- Add our target for packing -->
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);AddRefAssemblyToPackage</TargetsForTfmSpecificContentInPackage>
</PropertyGroup>
<ItemGroup Condition="$(TargetFramework) == 'netstandard2.0'">
<!-- Adding System.Reflection.Emit to because there are public types exposed from its's package -->
<PackageReference Include="System.Reflection.Emit" Version="4.7.0" />
</ItemGroup>
<Target Name="AddRefAssemblyToPackage" Condition="$(TargetFramework) == 'netstandard2.0'">
<ItemGroup>
<!-- Adding the Reference Assembly and the xml documentation to /ref of NuGet -->
<TfmSpecificPackageFile Include="$(OutDir)$(AssemblyName).dll">
<PackagePath>ref/netstandard2.0</PackagePath>
</TfmSpecificPackageFile>
<TfmSpecificPackageFile Include="$(OutDir)$(AssemblyName).xml">
<PackagePath>ref/netstandard2.0</PackagePath>
</TfmSpecificPackageFile>
</ItemGroup>
</Target>

<ItemGroup Condition="'$(TargetFramework)'=='net5.0'">
<PackageReference Include="System.Text.Json" Version="5.0.2" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net6.0'">
<PackageReference Include="System.Text.Json" Version="6.0.9" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net7.0'">
<PackageReference Include="System.Text.Json" Version="7.0.4" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net8.0'">
<PackageReference Include="System.Text.Json" Version="8.0.1" />
</ItemGroup>
<ItemGroup Condition="!$(IsNET5OrGreater)">
<ItemGroup Condition="'$(IsNET5OrGreater)' == 'false'">
<Compile Remove="**\*.net5.cs" />
<Compile Remove="**\*.net6.cs" />
<Compile Remove="**\*.net7.cs" />
<Compile Remove="**\*.net8.cs" />
</ItemGroup>

<Target Name="RemoveOldNuGetPackages" BeforeTargets="PreBuildEvent">
<PropertyGroup>
<WorkingDirectory>$(MSBuildThisFileDirectory)bin\$(Configuration)</WorkingDirectory>
</PropertyGroup>
<ItemGroup>
<OldNugetPackages Include="$(WorkingDirectory)\$(PackageId).*.nupkg" Exclude="$(WorkingDirectory)\$(PackageId).$(Version).nupkg" />
</ItemGroup>
<Delete Files="@(OldNugetPackages)" />
</Target>

<Target Name="Zip" AfterTargets="Pack" DependsOnTargets="CleanZip" Condition="'$(Configuration)'=='Release'">
<ZipDirectory SourceDirectory="$(MSBuildThisFileDirectory)bin\$(Configuration)" DestinationFile="$(MSBuildThisFileDirectory)bin\Harmony.$(Version).zip" Overwrite="true" />
</Target>
<Import Project="msbuild\netstandard.props" />

<Target Name="CleanZip" AfterTargets="Clean">
<ItemGroup>
<OldZipFiles Include="$(MSBuildThisFileDirectory)bin\*.zip" />
</ItemGroup>
<Delete Files="@(OldZipFiles)" />
</Target>
<Import Project="msbuild\clean.props" />

</Project>
Empty file added Harmony/msbuild/_._
Empty file.
17 changes: 17 additions & 0 deletions Harmony/msbuild/build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!-- Basic variables for the builds -->
<Project>

<PropertyGroup Condition="$(Configuration.StartsWith('Debug'))">
<Optimize>false</Optimize>
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
<DefineConstants>DEBUG</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="$(Configuration.StartsWith('Release'))">
<Optimize>true</Optimize>
<DebugType>none</DebugType>
<DebugSymbols>false</DebugSymbols>
</PropertyGroup>

</Project>
25 changes: 25 additions & 0 deletions Harmony/msbuild/clean.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!-- Clean scripts -->
<Project>

<Target Name="RemoveOldNuGetPackages" BeforeTargets="PreBuildEvent">
<PropertyGroup>
<WorkingDirectory>$(MSBuildThisFileDirectory)bin\$(Configuration)</WorkingDirectory>
</PropertyGroup>
<ItemGroup>
<OldNugetPackages Include="$(WorkingDirectory)\$(PackageId).*.nupkg" Exclude="$(WorkingDirectory)\$(PackageId).$(Version).nupkg" />
</ItemGroup>
<Delete Files="@(OldNugetPackages)" />
</Target>

<Target Name="Zip" AfterTargets="Pack" DependsOnTargets="CleanZip" Condition="$(Configuration.StartsWith('Release'))">
<ZipDirectory SourceDirectory="$(MSBuildThisFileDirectory)..\bin\$(Configuration)" DestinationFile="$(MSBuildThisFileDirectory)..\bin\Harmony_$(Configuration).$(Version).zip" Overwrite="true" />
</Target>

<Target Name="CleanZip" AfterTargets="Clean">
<ItemGroup>
<OldZipFiles Include="$(MSBuildThisFileDirectory)bin\*.zip" />
</ItemGroup>
<Delete Files="@(OldZipFiles)" />
</Target>

</Project>
37 changes: 37 additions & 0 deletions Harmony/msbuild/ilrepack.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!-- Everything related to ILRepack -->
<!-- Currently, we only allow .NET Framework to have IL Merged -->
<Project>

<Choose>
<When Condition="'$(IsFAT)' == 'true' AND '$(IsNETCore)' == 'false' AND '$(IsNET5OrGreater)' == 'false'">
<PropertyGroup>
<DoILRepack>true</DoILRepack>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<DoILRepack>false</DoILRepack>
</PropertyGroup>
</Otherwise>
</Choose>

<PropertyGroup Condition="'$(DoILRepack)' == 'true'">
<ILRepackTargetConfigurations>$(Configuration)</ILRepackTargetConfigurations>
<ILRepackAllowDuplicateResources>false</ILRepackAllowDuplicateResources>
<ILRepackMergeDebugSymbols>true</ILRepackMergeDebugSymbols>
<ILRepackPerformInternalize>true</ILRepackPerformInternalize>
<ILRepackCopyAttributes>true</ILRepackCopyAttributes>
<ILRepackBuildToolingPath>$(PkgBUTR_ILRepack)\tools\net461\ILRepack.exe</ILRepackBuildToolingPath>
</PropertyGroup>

<ItemGroup Condition="'$(DoILRepack)' == 'true'">
<!-- ILRepack.FullAuto seems to gracefully manage Windows, Linux and OS X -->
<!-- We do need to replace the original ILRepack with out fork that also supports the newer .NET runtime -->
<!--
<PackageReference Include="ILRepack" Version="*" PrivateAssets="all" IncludeAssets="none" />
<PackageReference Include="BUTR.ILRepack" Version="2.1.9-beta7" GeneratePathProperty="true" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />
-->
<PackageReference Include="ILRepack.FullAuto" Version="1.5.0" PrivateAssets="all" />
</ItemGroup>

</Project>
31 changes: 31 additions & 0 deletions Harmony/msbuild/netstandard.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!-- Everything related to creating .NET Standard 2.0 Reference Assemblies -->
<Project>

<!-- netstandard2.0 reference assemblies -->
<PropertyGroup Condition="$(TargetFramework) == 'netstandard2.0'">
<!-- Remove from /lib in NuGet -->
<IncludeBuildOutput>false</IncludeBuildOutput>
<!-- Create reference Assemblies instead of a full assembly -->
<ProduceOnlyReferenceAssembly>true</ProduceOnlyReferenceAssembly>
<!-- Add our target for packing -->
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);AddRefAssemblyToPackage</TargetsForTfmSpecificContentInPackage>
</PropertyGroup>

<ItemGroup Condition="$(TargetFramework) == 'netstandard2.0'">
<!-- Adding System.Reflection.Emit to because there are public types exposed from its's package -->
<PackageReference Include="System.Reflection.Emit" Version="4.7.0" />
</ItemGroup>

<Target Name="AddRefAssemblyToPackage">
<ItemGroup>
<!-- Adding the Reference Assembly and the xml documentation to /ref of NuGet -->
<TfmSpecificPackageFile Include="$(OutDir)$(AssemblyName).dll">
<PackagePath>ref/netstandard2.0</PackagePath>
</TfmSpecificPackageFile>
<TfmSpecificPackageFile Include="$(OutDir)$(AssemblyName).xml">
<PackagePath>ref/netstandard2.0</PackagePath>
</TfmSpecificPackageFile>
</ItemGroup>
</Target>

</Project>
Loading

0 comments on commit 89d4d9b

Please sign in to comment.