Using Mono.Cecil from a dotnet core app to load dotnet core and dotnet framework assemblies #744
-
Hi 👋 At https://github.com/stryker-mutator/stryker-net we use Mono.Cecil to load embedded resources from dll's so we can attach them to our manual (using roslyn sdk) recompile. This because there are many embedded resource types such as asp.net translations that are generated using 'custom tools' and we don't want to have to replicate all these tools in stryker. We don't always seem to be able to load the dll's due to errors. One user had the following issue: stryker-mutator/stryker-net#1501 The exact error is:
The user submitted a fix here: stryker-mutator/stryker-net#1502 Could anyone shine a light on if this is a good fix or if there is perhaps a better fix for this problem? I would rather want to avoid having to maintain a copy of a file from Mono.Cecil if I can. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey, At the end of the day, the resolving behavior provided by Cecil is a default one, and each application might have different requirements. Everything is done in Cecil so that you can provide you own assembly resolver, so if you need a resolver that can resolve both .NET Core and .NET Framework assemblies, feel free to either roll out your own, or take modify Cecil's to work for your use case. |
Beta Was this translation helpful? Give feedback.
Hey,
At the end of the day, the resolving behavior provided by Cecil is a default one, and each application might have different requirements.
Everything is done in Cecil so that you can provide you own assembly resolver, so if you need a resolver that can resolve both .NET Core and .NET Framework assemblies, feel free to either roll out your own, or take modify Cecil's to work for your use case.