A core feature of Visual Studio that allows developers to inspect, analyze, and troubleshoot code during execution.
Most likely, the exe is still running, so the build can not write the new exe. Check with process list if still running.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
From: Washington Peralta
User of Visual Studio 2019
To: Microsoft Customer Service
Subject: Asking for help because I am having a problem using Visual Studio 2019
1.) I compile a program, and the program compile successfully
2.) I run the program, and the program run ok
3.) I make a slight change to the program: inside a phrase between quotation marks I add 5 blank spaces
4.) I compile the modified propgram and the compilation is ok
5.) I run the modified program, and the modified program doesn’t run; it appears a little window with the text
Microsoft Visual Studio
! There were build errors. Would you like to continue and run the
Last successful build
YES NO
6.) I make click in NO and it appear the errors MSB6006 and LINK1168
Severity Error
Code LINK1168
Description cannot open C:\Users\peral\source\repos\WSB-CH-02-28\Debug\WSB-CH-02-28.exe for writing
Project WSB-CH-02-28
File C:\Program Files (x86)\Microsoft Visual
Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets
Line 1074
Suppression State
Severity Error
Code MSB606
Description "link.exe" exited with code 1168.
Project WSB-CH-02-28
File C:\Users\peral\source\repos\WSB-CH-02-28\LINK
Line 1
Suppression State
Please could you help me to find a solution to my problem?
Thank you in advance.
Best regards.
Washington Peralta
******@gmail.com
A core feature of Visual Studio that allows developers to inspect, analyze, and troubleshoot code during execution.
Most likely, the exe is still running, so the build can not write the new exe. Check with process list if still running.
I am happy, I have applied the solution
Clean and Rebuild: Try cleaning the solution and then rebuilding it. You can do this by going to the menu and selecting Build > Clean Solution, followed by Build > Rebuild Solution.
and It have worked perfect.
Thank you very much
Washington Peralta
It seems that you are encountering build errors in Visual Studio 2019 after making a minor change to your program. The errors you mentioned, specifically MSB6006 and LINK1168, indicate that the linker is unable to open the executable file for writing. This can happen for a few reasons:
WSB-CH-02-28.exe) is not currently running. If it is, close it before trying to build again.Build > Clean Solution, followed by Build > Rebuild Solution.If these steps do not resolve the issue, you may want to check the project settings or consult the Visual Studio documentation for further troubleshooting guidance.
References: