I've upgraded a WCF project running 3.5 vs2008 to .net 4.0 vs2010 and run into a problem. When compiling from vs2010 an assembly in my service implementation project is locked by devenv.exe (note no debugging - only compiling). The assembly is released when vs2010 is restarted and can be compiled once, after each restart. What I've tried to far:
- Insert PreBuild event to unlock the assembly
- removed assembly version wild card
- Disabled source stepping
- stopped windows search
- stopped IIS
- quit vs2010, removed sln.suo and bin/obj folder
- Read blog and SO posts for 3 days now :)
- Removed all references from the service project and readded them
I've pretty much run out of ideas and it seems that Microsoft have no explaination for this an no fix. Any ideas would be greatly appreciated!
Error Message:
Unable to copy file ".....some path...\Debug\HelperLibrary.Service.dll" to "bin\Debug\HelperLibrary.Service.dll". The process cannot access the file 'bin\Debug\HelperLibrary.Service.dll' because it is being used by another process.
Bonus information: When compiling from prompt with msbuild, there's no problem. Only when compiling from vs2010. The old vs2008 solution of course still work.
Microsoft Ticket: https://connect.microsoft.com/VisualStudio/feedback/details/682485/use-of-testaccessor-and-impl-of-codeaccesssecurityattribute-locks-assembly