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
- Build Action: Content
- Copy to Output Directory: Copy always
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?