none
VS 2010 in Windows 10

    Question

  • Hi,

    I work with VS 2010, SP1 (for technical reasons I cannot use a later version). Ever since I migrated from Windows 7 to Windows 10 I am having problems building executable files with VS 10. All projects compile, but then I get the following error:

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

    This was not happening under Windows 7 (or 8 on another machine). I can fix this by deleting bin\Debug\SMV.exe, but doing this consumes time and gets old very quickly.

    I was wondering if anybody else has observed this and if there is a workaround?

    Thanks in advance.

    Peter


    PMBT

    Tuesday, November 17, 2015 4:01 PM

Answers

All replies

  • Hi Peter,

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

    Please check that whether it is related to the project property "Enable the Visual Studio hosting process".

    I met this kind of error before which was related to this option.

    Reference:

    https://social.msdn.microsoft.com/Forums/windowsserver/en-US/c43366d0-fd69-410c-8da1-bef6b97f5954/unable-to-build?forum=vsdebug

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, November 19, 2015 11:05 AM
    Moderator
  • Hi Jack,

    Thank you for your help. Not sure if that was the problem - strange thing happened - the problem went away, and I didn't do anything. Well, this last sentence is probably not true, as i continue working on various parts of 80 project solution - but I did not reconfigure anything in the VS. For some reason the issue went away. Maybe it is some kind of a race condition in the VS.

    Not sure what triggered the issue - was it one of my code changes to one of the projects, or migration to Windows 10.

    Thanks again any way - will try your suggestion if the problem reappears.

    Peter


    PMBT

    Thursday, November 19, 2015 12:27 PM
  • You were welcome, Peter!

    Since it works well now, I will close this case, but if it has this issue again, please feel free to let me know. I will follow up this case.

    Thanks,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, November 20, 2015 7:04 AM
    Moderator
  • Hi Jack,

    I was wrong, it only works when you re-start VS or delete appropriate directories. Disabling VS Hosting Process helps, but that turns off a number of debugger features.

    Any other ideas?

    Thanks in advance.

    Peter


    PMBT

    Friday, November 20, 2015 12:44 PM
  • Hi Peter,

    Thanks for your friendly response.

    >>Disabling VS Hosting Process helps, but that turns off a number of debugger features.

    So you mean that it worked well after you disable this option, if so, whether you disable this option in your previous windows which work normally?

    Actually it still has this issue in VS2015 CTP before like this report:

    https://connect.microsoft.com/VisualStudio/Feedback/Details/1121992

    Disable that option "Enable the Visual Studio hosting process" is the solution I could get now.

    I know that disable it would impacts certain functions, but you would check that whether it really impacts your debugging:

    https://msdn.microsoft.com/en-us/library/ms185330.aspx

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

    In addition, I also did some research about this error, other members also provide some workarounds like add the pre-build event or others even if using different VS versions.

    https://social.msdn.microsoft.com/Forums/en-US/cd12f3c7-de96-4353-adce-23975e30933f/unable-to-copy-file-the-process-cannot-access-the-file-because-it-is-being-used-by-another-process

    http://www.bytemedev.com/how-to-fix-visual-studio-error-the-process-cannot-access-the-file-because-it-is-being-used-by-another-process/

    You could refer to them, but if still no help, one idea is that you could test is using the latest VS2013 or VS2015 RTM version, at least, we could know that whether this issue has been resolved in the high VS version.

    Note: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you.

    Microsoft does not control these sites and has not tested any software or information found on these sites;

    Therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there.

    There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, November 23, 2015 5:40 AM
    Moderator
  • Hi Jack,

    Thank you for all your help, I will look into all referenced documentation. As for disabling  VS Hosting Process, you are correct, disabling it helped, the issue is no longer there. You are also correct in that the issue was not there when running under Windows 7.

    Peter


    PMBT

    Monday, November 23, 2015 11:53 AM
  • You are welcome, Peter:)

    If you get any latest information, please feel free to let me know. Of course, if certain reply is helpful for you, please mark it as the answer, so it would be helpful for other other members who get the same issue.

    Have a nice day,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, November 24, 2015 3:11 AM
    Moderator