I am using Visual Studio 2012 to build a WPF program. There is a DLL compiled from C that I use DllImport to call. The Dll is added in the project and marked as
When the project solution is built the dll is copied to Debug folder with the .exe generated by Visual Studio successfully. However, when i run it, either by double click the generated .exe from File Explorer or "Run" in the VS debugger, the dll suddenly gets deleted by itself.
Why?
If it does this when running from File Explorer, then either
or
After many tries I've found some pattern which can be also a workaround. Assume we have 3 projects, A, B and C.
Maybe it'd help someone to track the reasons.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With