locked
Cannot run F5 after restore of project RRS feed

  • Question

  • I'm lost.

    When I started working this morning I first made a copy of my project folder and saved it on another disk.  

    I then proceeded to work on my project and managed to make a mess of it so I decided to restore the project folder from the copy I made this morning.  

    Now when I attempt to run F5 to build and run the project in debug mode I get this error...

    Error 12 Unable to copy file "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\LightSwitch\Client\Microsoft.LightSwitch.dll" to "bin\Debug\bin\Microsoft.LightSwitch.dll". The process cannot access the file 'bin\Debug\bin\Microsoft.LightSwitch.dll' because it is being used by another process. 

    I would have thought that restoring the project folder would have gotten me back to the same state LS was in when I first started working this morning.

    What am I missing?

    Monday, January 14, 2013 6:44 PM

Answers

  • Thanks for the fast replies.

    I re-booted the computer and then went into LS again and had the same problem.  

    I then ran "Start without debugging" and the project ran fine so I shut down LS and then restarted and this time everything is back to normal including F5.  

    My heart can't take too many more of these...  LOL.   

    Thanks. 

    Monday, January 14, 2013 7:12 PM

All replies

  • Hey, can you close the project and VS and review the current process (task manager) that are running?  There may be a lingering msbuild or devenv process that is hanging around.  If yes, please end them and try again.


    Robert Schoen (Microsoft Visual Studio LightSwitch Team)


    Monday, January 14, 2013 6:48 PM
  • You need to clean the solution and try a rebuild. Should work.

    If that fails, unlikely, close solution, delete all file/folder like 'bin' and 'obj' apart from your main 'bin\Data'! Then rebuild.


    Dave Baker | Xpert360 blog | twitter : @xpert360 Opinions are my own. Please mark as answer if this helps solve your problem.

    Monday, January 14, 2013 6:50 PM
  • Thanks for the fast replies.

    I re-booted the computer and then went into LS again and had the same problem.  

    I then ran "Start without debugging" and the project ran fine so I shut down LS and then restarted and this time everything is back to normal including F5.  

    My heart can't take too many more of these...  LOL.   

    Thanks. 

    Monday, January 14, 2013 7:12 PM
  • Glad to hear that you are back up and working.   As the error indicated, there was something (process) hanging around that was holding onto some of your outputs.  If you find that you are hitting this often, finding out the exact repro of how you are encountering it would be great to understand better.  

    i'll continue to follow this thread for a while so if you find more information about the repro please post it here.

    Thanks!


    Robert Schoen (Microsoft Visual Studio LightSwitch Team)

    Monday, January 14, 2013 7:22 PM
  • Hi Robert,

    This has happened to me from time to time and 'clean the solution and try a rebuild' has always worked. There are older threads with this topic.

    As you are interested I will spend some time investigating next time it happens.

    Cheers

    Dave


    Dave Baker | Xpert360 blog | twitter : @xpert360 Opinions are my own. Please mark as answer if this helps solve your problem.

    Monday, January 14, 2013 7:46 PM
  • Great!

    BTW, there are four process that I am aware of that you might want to keep an eye on:

    msbuild.exe
    devenv.exe
    sqlservr.exe
    vslshost.exe

    Any info provided would be appreciated regarding those processes locking project related bits or any other process that may be causing similar locking type issues.


    Robert Schoen (Microsoft Visual Studio LightSwitch Team)

    Monday, January 14, 2013 9:24 PM