Unable to copy file reference.dll to bin/reference.dll. The process cannot access the file reference.dll because it is being used by another process

后端 未结 30 1933
深忆病人
深忆病人 2021-01-31 03:34

For one of my ASP.NET 3.5 applications, every single time I try to build the web app, it throws the following build errors in Visual Studio 2008:

Error 16

相关标签:
30条回答
  • 2021-01-31 04:00

    Easy fix for Windows 7: Start the service "Application Experience" . Search for "Services" in "Control Panel".

    -Martin

    0 讨论(0)
  • 2021-01-31 04:00

    There was a specific bug in Visual Studio 2008 which was fixed in SP1 which may be your issue. It occurs when you reference an embedded JavaScript file and causes the problem you are seeing. See here for more details.

    0 讨论(0)
  • 2021-01-31 04:00

    I also face this problem. First i try to delete contentious .dll but it shows Access denied, then i close my VS and after open, it works fine.

    0 讨论(0)
  • 2021-01-31 04:01

    I just wanted to say that this problem started with me today. (VS 2010, C#) I have been working on this program for a month without this problem, now today it started. I start VS, change code, compile and test and quit program. Make another change, compile and BOOM Unable to copy file "obj\x86\Debug\progname.exe" to "bin\Debug\progname.exe" because if is being used by another process.

    ProcExp shows only Visual Studio (actually devenv.exe) using this file. There is only one instance of VS running. There are two listing on my debug\progname.exe, one is a Type DLL, the other is a Type handle.

    Using devenv /ResetSettings did not resolve anything, but wasted 10 minutes putting everything back to my desired view.

    Using the PREBUILD events rename trick mentioned above solves the problem for a couple of changes, but on the next change the "exe.locked" file is locked and cannot be deleted. Then the rename fails.

    The debug\progname.exe file name remains locked even after closing the project.

    Closing VS, manually delete the files in the debug folder, opening VS and my solution, then Build->Clean Solution seems to work for me, at least its working now after I did all of that stuff.

    Hope this helps -rwg

    0 讨论(0)
  • 2021-01-31 04:03

    I did had simillar problem solution for me was to look at the *.csproj file and under i found missing file so and below was correct one so i just removed lines and it worked straight away

    0 讨论(0)
  • 2021-01-31 04:03

    open your project in explorer click the property of the bin folder and uncheck the read only property this one works in my xamarin forms project

    0 讨论(0)
提交回复
热议问题