Company
Date Published
Author
Bruno Garcia
Word count
947
Language
English
Hacker News points
None

Summary

The .NET plugin model is plagued by assembly loading conflicts due to the complex history and rules of assembly loading in .NET, which makes it difficult to load multiple versions of the same assembly into a shared context. This issue affects Unity Package Manager (UPM) packages that bundle System DLLs with different versions, causing conflicts when used together. The Sentry SDK for .NET is one such package that requires a solution to resolve these conflicts. After considering existing options like Costura and ILMerge/ILRepack, the developers of the Sentry SDK created a new tool called Alias, which performs the following steps: renaming dependencies with unique keys, patching references in target assemblies and dependencies, and producing a group of files that will not conflict with any assemblies loaded in the plugin context. The tool is shipped as a dotnet CLI tool and can be used to resolve conflicts in UPM packages, including those from Unity.