jbevain / cecil

Cecil is a library to inspect, modify and create .NET programs and libraries.
MIT License
2.73k stars 624 forks source link

Enhance assembly name reference and system type resolution #929

Open DenisKudelin opened 11 months ago

DenisKudelin commented 11 months ago

This commit refines the system type import functionality in Mono.Cecil to ensure that system types are resolved efficiently and do not introduce unnecessary assembly references. By aligning the import logic with the assembly containing the built-in System.Object type, the mechanism now avoids importing types from system assemblies that the running assembly already references.

Key changes you'll find in this commit:

These changes contribute to a leaner import process, eliminating redundant assembly references and adhering to the common developer expectations regarding system type resolution in .NET environments.