Invalid assembly after weaving
See original GitHub issueNot sure if this is an InlineIL.Fody
, Fody
or Mono.Cecil
bug.
Repro: https://github.com/CosmosOS/Cosmos/tree/inline-il
The verification fails, and if I try to load the assembly at runtime it fails with BadImageFormatException
. ILSpy loads it correctly.
I tried adding ExcludeAssets="All"
here: Cosmos.Core_Asm.csproj#L13, and then used ildasm
on both assemblies, and the main difference (ignoring the parts which were not weaved) is the .imagebase
, which is 0x00400000
when weaved, and 0x10000000
when not.
Any help would be appreciated.
Issue Analytics
- State:
- Created 5 years ago
- Comments:16 (9 by maintainers)
Top Results From Across the Web
Unable to compile project due to Fody errors. Nothing with ...
It would seem that your error is actually in finding a class called ModuleWeaver . This class is part of the Fody package....
Read more >Weaver Exception when load the Fusion Application Loop ...
Hi photon engineers,. I have experience with PUN 1 & 2 and was excited to try Fusion. I decided to reverse engineer the...
Read more >Building a Fody plugin - pt II - Michiel Sioen
The most important test you can do is verify if the assembly has valid IL code after weaving. This can be done with...
Read more >Tablet weaving error diagnosis help! The pattern is sort of ...
The pattern is there, it is just jagged because your threading direction is incorrect. Card weaving can be very confusing because some patterns ......
Read more >Creating a Fody Add-in
IL weaving allows for creating assemblies that violate C# rules. It also means that since you don't have the compiler validating your code, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That was a hack to support a niche edge case I once had. To do with mixing signed and unsigned dlls when using ilmerge. That use case is no longer valid and that property copy could be removed
Yay \o/
Indeed, I can see that Cosmos sets
SignAssembly
in the “targets” file. Glad you got it figured out.@SimonCropp why does Fody copy
SignAssembly
toFodySignAssembly
inFody.targets
? The commit that introduces this change only says “perf hacks”…