Comments (3)
When you say "merge with mscorlib" what do you mean/want to achieve?
from il-repack.
I'm looking to inject a static class into mscorlib.dll and then inject calls to that class in the standard calls. I'm doing this to better monitor malware that is packed. It does things like unpack it's strings and code, and it also detects debuggers and most attempts to unpack.
What I want to do is take a small assembly with that static class and the mscorlib.dll from \Microsoft.NET\assembly\GAC_32\mscorlib\v4....\mscorlib.dll and put them together. I have some code to do this myself but it's not very robust so I was looking for anything that has already solved the problem.
from il-repack.
This only occurs because you're merging mscorlib, which defines System.Int32 (etype == I4).
The base enum type then references the (newly created) merged type System.Int32 (etype == None).
When writing the assembly, having an enum overriding a custom value type isn't valid/supported.
I can't really tell if the behaviour should be changed for this use case, neither can I tell if things will work fine.
If you (still) want to pursue the use of ILRepack in this context, I suggest patching it so that you reuse the mscorlib AssemblyDefinition, and only import your extra stuff in it.
(ILRepack used to support this behavior, but it was 'hiding' too many issues, so I prefered merging all assemblies into a new empty one, instead of merging all others into the primary one)
PR welcome if you make that into an option (/reusePrimaryAssembly or something)
from il-repack.
Related Issues (20)
- SourceLink is not working when ILRepack is used.
- IL-repack fails when merging assemblies with netmodules
- Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly HOT 2
- Failed to resolve assembly: 'Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' HOT 1
- can i be new maintainer HOT 6
- No logging when using ILRepack programmatically
- More granular Internalize excluding HOT 2
- Option to remove all non-referenced members from output assembly HOT 6
- Merge success reported, but assemblies not merged in publish folder HOT 3
- Module initializers are DuplicateIgnored away
- Can't add Microsoft.VisualStudio.LanguageServer.Protocol.dll (from NuGet) HOT 3
- Is this project abandoned? If so, what are the alternatives? HOT 5
- ConfigMerger loses the default value
- InvalidCastException when trying to merge Oracle.ManagedDataAccess.dll
- ReferenceFixator fails to fix MethodReference if the method is defined on the base class. HOT 2
- Specified method is not supported. #900 HOT 3
- ExcludeFiles appears to be being ignored? HOT 2
- Mixed assembly, use /zeropekind still raise Writing mixed-mode assemblies is not supported HOT 1
- Embedded PDB not handled properly HOT 1
- DLL fails to load HOT 2
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.