From 7e5cbb24fdd062d2a9920379cf1aea3cd23e6b8f Mon Sep 17 00:00:00 2001 From: Kirill Osenkov Date: Sun, 31 Mar 2024 20:11:46 -0700 Subject: [PATCH] Ensure build works when .NET Core 3.1 or 5.0 is not installed (#604) ILRepack usually resolves framework assemblies from the dotnet SDK directories if the corresponding .NET Core version is installed. If it's not installed, let's download Microsoft.NetCore.App.Ref NuGet package (equivalent of Microsoft.NETFramework.ReferenceAssemblies but for Core) of the specified version and pass the path to ILRepack so it can find the .dlls there. Confirmed this fixes the build. --- Harmony/Harmony.csproj | 9 +++++++++ ILRepack.targets | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/Harmony/Harmony.csproj b/Harmony/Harmony.csproj index 7950eb85..e80a3b5d 100644 --- a/Harmony/Harmony.csproj +++ b/Harmony/Harmony.csproj @@ -87,6 +87,15 @@ + + + + + + + diff --git a/ILRepack.targets b/ILRepack.targets index ca906eb9..eb2de210 100644 --- a/ILRepack.targets +++ b/ILRepack.targets @@ -8,8 +8,17 @@ + + + + + + + +