简体   繁体   中英

Connecting native C++ dll with C# by C++/CLI wrapper, Visual Studio issue

I'm working on a three projects.

The first one is a native C++ dll, let's name it as a native.dll.

The second is a C++/CLI dll (man.dll), which contains a bunch of wrapper functions (native.dll is statically linked).

Finally, the man.dll is used( as a reference) in a C# WinForm project. Everything work perfect, I can use a native function in C#, but after a couple(!) builds (in debug mode) the C# project, I can't recompile native.dll, I can't even delete this file because Windows says that the file is being in use by Visual Studio. Why?

I'm working in Visual Studio 2010.

Virus scanner can definately cause problems but in my experience they tend to be intermittent. Have you tried the obvious things: - restart visual studio? - logout then back in? - reboot?

Silly as it sounds in this day and age - sometimes it really can be that simple...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM