I\'ve got a C# webforms
app, that until today had been working just swimmingly.
Now today, all of a sudden, every time I try run the app, I get a file l
VS2017 - Solved by closing all instances of MSBuild.exe in the windows task manager
Just to throw in my 2 cents. My issue was solved by opening Task Manager and killing the application. It was running in the background without any indication that it was running at all (no item in the task bar, no ui, nothing), but I am not sure why this happened. Obviously the debugger was not running and I only had a single instance of VS opened at the time. It amazes me that this is still happening in this VS 2017.
Perhaps I can add a build step that looks for the application running the background and kills it before starting the new one.
When I ended the process .Net Core Host
, everything built fine. I didn't have to close Visual Studio or do change anything else.
Just check the references and remove the self-reference to the project.
Explanation: My problem started after creating a custom control and drag and drop it to the toolbox palette for use it in design forms. First appeared a warning saying that there was a redundance between the custom control source file (.cs) and the projects executable (.exe). On executing/debugging appeared the error: unable to access the (.exe) because it's being used (and it was true).
I literally removed the whole source code regarding the custom control and the problem still remained, until I checked out the references and it was referencing itself in order to be "able to" get the former custom control. I removed the reference and done!!
In my case there were some vstest processes running (with various names but all containing the string vstest). I had to terminate them in taskmgr.
Deleting Obj, retail and debug folder of the .NET project and re-building again worked for me.