-
-
Notifications
You must be signed in to change notification settings - Fork 509
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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
Showing
15 changed files
with
463 additions
and
287 deletions.
There are no files selected for viewing
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
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
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
Empty file.
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
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> |
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
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> |
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
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> |
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
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> |
Oops, something went wrong.