Environment:
vs 2017.9 /net45
using Costura.Fody v3.3.3
In Nunit test project I run the command:
dotnet test -f net45 -c Debug //test fail
dotnet test -f net45 -c Release //test success
I get the error
OneTimeSetUp: System.TypeInitializationException : The type initializer for '' threw an exception. ----> System.IO.FileNotFoundException : Could not load file or assembly 'System.Private.CoreLib, Version=4.0.0.0, Culture=neutral or one of its dependencies. The system cannot find the file specified.
I added the file FodyWeavers.xml
in the root of the test project as described in Fody.Costura
which contain:
<Weavers>
<Costura ExcludeAssemblies='myprogram.exe'
CreateTemporaryAssemblies='true'
DisableCleanup='true'
/>
</Weavers>
How to resolve the error in Debug?