Giter VIP home page Giter VIP logo

Comments (15)

pardeike avatar pardeike commented on August 26, 2024 1

my bad, everything works as expected

from il-repack.

KirillOsenkov avatar KirillOsenkov commented on August 26, 2024

Hmm I just cloned and built Harmony and I get an error:
image

Have you seen this?

Happy to take a look at this as well.

from il-repack.

KirillOsenkov avatar KirillOsenkov commented on August 26, 2024

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.

pardeike avatar pardeike commented on August 26, 2024

Could very well be. Harmony support a wide range of .net versions so I guess you need the sdks

from il-repack.

KirillOsenkov avatar KirillOsenkov commented on August 26, 2024

OK here's the fix for the build to not require all the .NET Core SDKs installed:
pardeike/Harmony#604

from il-repack.

KirillOsenkov avatar KirillOsenkov commented on August 26, 2024

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.

KirillOsenkov avatar KirillOsenkov commented on August 26, 2024

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.

KirillOsenkov avatar KirillOsenkov commented on August 26, 2024

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.

KirillOsenkov avatar KirillOsenkov commented on August 26, 2024

Easy peasy! Apparently we forgot to rewrite types for parameters of calli instruction. Confirmed checkbinarycompat is happy now.

from il-repack.

KirillOsenkov avatar KirillOsenkov commented on August 26, 2024

Published https://www.nuget.org/packages/ILRepack/2.0.29 and https://www.nuget.org/packages/ILRepack.Lib/2.0.29

from il-repack.

pardeike avatar pardeike commented on August 26, 2024

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.

pardeike avatar pardeike commented on August 26, 2024

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.

KirillOsenkov avatar KirillOsenkov commented on August 26, 2024

OK I'll look again and maybe this time I'll actually try the fix :)

from il-repack.

KirillOsenkov avatar KirillOsenkov commented on August 26, 2024

do you have a specific test that fails in debugfat?

from il-repack.

KirillOsenkov avatar KirillOsenkov commented on August 26, 2024

also to be conpletely sure, can you please git clean -xdf and try again?

from il-repack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.