Visual Studio locks output file on build

前端 未结 16 1353
一生所求
一生所求 2020-12-02 06:28

I have a simple WinForms solution in VS 2010. Whenever I build it, output file (bin\\debug\\app.exe) ends up locked, and subsequent builds fail with a message like \"

16条回答
  •  隐瞒了意图╮
    2020-12-02 07:02

    I had this problem and resolved it with some custom code. See here: Visual Studio 2010 build file lock issues

    Compile the utility in the accepted answer and reference it during the build step as described to workaround the problem. I still turn off VS 2010 at lunch to clean up the morning's work.

    The reason for the custom code was that the often recommended solution only worked once and then the renamed files were also locked, preventing the rename. Here we just append the data-time info to the file so the renamed versions can't conflict.

提交回复
热议问题