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)
- 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
- Repacking Harmony in Debug mode fails HOT 15
- 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
- ArgumentOutOfRange in RepackAssemblyResolver.cs:line 203 HOT 2
- TypeReference with null scope
- Metadata warnings in MashupEngine
- Read of keyfile fails on Linux
- Improve error message for when dotnet.exe can't be found HOT 3
- How to debug a merged assembly (.EXE)? HOT 30
- .Net Framework 4.7.2, XAML not working for EXE 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.