Comments (15)
my bad, everything works as expected
from il-repack.
Hmm I just cloned and built Harmony and I get an error:
Have you seen this?
Happy to take a look at this as well.
from il-repack.
I'm guessing this is because I don't have .NET 5.0 installed so it can't resolve against .NET 5.0 (and 3.1?)
from il-repack.
Could very well be. Harmony support a wide range of .net versions so I guess you need the sdks
from il-repack.
OK here's the fix for the build to not require all the .NET Core SDKs installed:
pardeike/Harmony#604
from il-repack.
OK indeed I can confirm something is wrong.
dotnet tool update -g checkbinarycompat
cd C:\Harmony\Harmony\bin\DebugFat\net8.0
checkbinarycompat 0harmony.dll
produces BinaryCompatReport.txt:
In assembly '0Harmony, Version=2.3.3.0, PublicKeyToken=null': Failed to resolve assembly reference to 'Microsoft.Win32.Primitives, Version=8.0.0.0, PublicKeyToken=b03f5f7f11d50a3a'
In assembly '0Harmony, Version=2.3.3.0, PublicKeyToken=null': Failed to resolve type reference 'MonoMod.Core.Interop.CoreCLR' in assembly 'System.Text.Json, Version=8.0.0.0, PublicKeyToken=cc7b13ffcd2ddd51'
In assembly '0Harmony, Version=2.3.3.0, PublicKeyToken=null': Failed to resolve type reference 'MonoMod.Core.Interop.CoreCLR/V21' in assembly 'System.Text.Json, Version=8.0.0.0, PublicKeyToken=cc7b13ffcd2ddd51'
In assembly '0Harmony, Version=2.3.3.0, PublicKeyToken=null': Failed to resolve type reference 'MonoMod.Core.Interop.CoreCLR/V21/CORINFO_METHOD_INFO' in assembly 'System.Text.Json, Version=8.0.0.0, PublicKeyToken=cc7b13ffcd2ddd51'
In assembly '0Harmony, Version=2.3.3.0, PublicKeyToken=null': Failed to resolve type reference 'MonoMod.Core.Interop.CoreCLR/V70' in assembly 'System.Text.Json, Version=8.0.0.0, PublicKeyToken=cc7b13ffcd2ddd51'
In assembly '0Harmony, Version=2.3.3.0, PublicKeyToken=null': Failed to resolve type reference 'MonoMod.Core.Interop.CoreCLR/V70/AllocMemArgs' in assembly 'System.Text.Json, Version=8.0.0.0, PublicKeyToken=cc7b13ffcd2ddd51'
In assembly '0Harmony, Version=2.3.3.0, PublicKeyToken=null': reference 'System.Text.Json, Version=8.0.0.0, PublicKeyToken=cc7b13ffcd2ddd51' resolved from 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.3\System.Text.Json.dll' as 'System.Text.Json, Version=8.0.0.0, PublicKeyToken=cc7b13ffcd2ddd51'
from il-repack.
checkbinarycompat is a tool I wrote to resolve all assembly refs, type refs and member refs and ensure they are present in the referenced assembly:
https://www.nuget.org/packages/checkbinarycompat#readme-body-tab
from il-repack.
Indeed, I'm seeing 10 invalid tokens in the merged assembly:
calli valuetype MonoMod.Core.Interop.CoreCLR/CorJitResult(native int,native int,native int,valuetype [ERROR: INVALID TOKEN 0x23000007] MonoMod.Core.Interop.CoreCLR/V21/CORINFO_METHOD_INFO*,uint32,uint8**,uint32*)
from il-repack.
Easy peasy! Apparently we forgot to rewrite types for parameters of calli
instruction. Confirmed checkbinarycompat
is happy now.
from il-repack.
Published https://www.nuget.org/packages/ILRepack/2.0.29 and https://www.nuget.org/packages/ILRepack.Lib/2.0.29
from il-repack.
Wow, cool, thanks for the swift response and fix. Also nice to get a PR from you so it builds regardless of sdk installs.
from il-repack.
Hmm, I still cannot use the resulting DebugFat package with the same error message as before. The change did fix something but it still fails (and ReleaseFat still works).
from il-repack.
OK I'll look again and maybe this time I'll actually try the fix :)
from il-repack.
do you have a specific test that fails in debugfat?
from il-repack.
also to be conpletely sure, can you please git clean -xdf and try again?
from il-repack.
Related Issues (20)
- SourceLink
- ContinuousIntegrationBuild
- Issue with 2.0.22: Failed to resolve assembly 'Microsoft.Build.Framework' HOT 7
- Properly document all new command line options
- Proposal: Rename /ExcludeInternalizeSerializable to /InternalizeSerializable HOT 1
- Better support for dropping attributes HOT 5
- Add developmentDependency to the nuspec HOT 2
- Error merging VB app in 2.0.27 HOT 20
- Mysterious failure in ILpacked application HOT 10
- Am I misunderstanding ILRepack / ILMerge HOT 11
- Exceptions aren't renamed? HOT 3
- ILRepacked DLL is looking for PDB files in a non-existent subfolder HOT 5
- Ability to internalize a subset of input assemblies HOT 1
- Add an Icon to the nuget package HOT 1
- Disable source server warning on unix HOT 2
- Possible Internalize regression HOT 5
- Cecil binaries need to be internalized HOT 7
- Getting "Method reference is used with definition return type / parameter." / Due to TypeForwardedTo type HOT 22
- Replacement for AllowDuplicateType Method of ILMerge HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from il-repack.