Module.Load often results in FileNotFoundException #745
-
Hi 👋 In stryker we use Mono.Cecil to load embedded resources from dll's. However loading the dll often fails with a FileNotFoundException even though I can confirm on the filesystem that the dll does exist in that location. We get the output location directly from MSBuild. Can anyone give some hints as to why it might be that Cecil cannot open the dll even though it is there? Here is the class where we load the Embedded Resources: https://github.com/stryker-mutator/stryker-net/blob/v1.0/src/Stryker.Core/Stryker.Core/Initialisation/EmbeddedResourcesGenerator.cs |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
Hello, This is not something that I ever seen. Cecil doesn't throw If an actual |
Beta Was this translation helpful? Give feedback.
Hello,
This is not something that I ever seen. Cecil doesn't throw
FileNotFoundException
by itself. It can sometimes throw aAssemblyResolutionException
which extendsFileNotFoundException
.If an actual
FileNotFoundException
it's being thrown by .NET as the OS is telling the .NET framework the file asked for the path doesn't exist.