Build error: “The process cannot access the file because it is being used by another process”

后端 未结 30 1845
青春惊慌失措
青春惊慌失措 2020-12-13 03:08

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

30条回答
  •  攒了一身酷
    2020-12-13 03:53

    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!!

提交回复
热议问题