0

I get the following error:

Error: Unable to copy file "obj\Debug\xx.exe" to "bin\Debug\xx.exe". The process cannot access the file 'bin\Debug\xx.exe' because it is being used by another process.

I'm using version 15.3.5 of VS.

I'm aware that csc.exe is the compiler. What I want to ensure, when debugging from Visual studio 2017, is which process is it that ultimately creates the final file in the bin or release folder? Is this constructed in the obj folder and copied over to the final destination by another process?

I suspect that this is our corporate antivirus, given that 'system' acquires the lock for a few minutes at a time.

What is the process name that ultimately creates the binary in the bin/debug or bin/release folder from Visual Studio?

I will use this to configure our antivirus exclusion list.

1 Answer 1

1

What is the process name that ultimately creates the binary in the bin/debug or bin/release folder from Visual Studio?

According the log in the output window "Copying file from "obj\Debug\xx.exe" to "bin\Debug\xx.exe", we could to know that the binary in the debug/release is copy from obj folder.

After using process monitor to monitor which process write file during build time, I found that the processes "VBCSCompiler.exe"and "devenv.exe" would write file for that .exe file. You can use process monitor to find out which process copy the .exe file. Besides, you can try to disable antivirus to verify whether antivirus causes this problem.

As a workaround, you can add Visual studio 2017 folder to antivirus exclusion list.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.