jbevain / cecil

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

Enhance assembly name reference and system type resolution #929

Open DenisKudelin opened 1 year ago

DenisKudelin commented 1 year 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.