ASP.Net cannot create/shadow copy

前端 未结 11 1617
暗喜
暗喜 2020-12-29 02:02

I get this error repeatedly when developing ASP.Net applications:

  Cannot create/shadow copy \'XXXXX\' when that file already exists

Where

相关标签:
11条回答
  • 2020-12-29 02:35

    GO to the design mode and then right click and hit view in browser, the issue will go away Anil Madan

    0 讨论(0)
  • 2020-12-29 02:35

    If you use Entity Framework:

    Error Message: "Cannot create/shadow copy '' when that file already exists."

    Solution: "Wait a few seconds and refresh the page."

    For more information please visit: Advanced Entity Framework 6 Scenarios for an MVC 5 Web Application (12 of 12)

    0 讨论(0)
  • 2020-12-29 02:36

    You just Refresh (F5) your page.

    0 讨论(0)
  • 2020-12-29 02:37

    Add these lines in the pre-build event command line, which basically unlocks the DLL within Visual Studio:

     IF EXIST $(TargetPath).LOCKED  (del $(TargetPath).LOCKED)
      ELSE (IF EXIST $(TargetPath) (move $(TargetPath) $(TargetPath).LOCKED))
    

    Re-compile and your unable to copy DLL error will not occur.

    0 讨论(0)
  • 2020-12-29 02:39

    I was getting this issue frequently when working with an imported DLL which we created.

    Attempts to stop is happening failed, and even introduced different problems, but whenever it occurred I would just do a rebuild solution and the problem would immediately disappear for that build.

    Also, I haven't seen the problem since working on Visual Studio 2002. 2008 does not have this issue that I know of, neither does 2005. Are you using an older VS?

    0 讨论(0)
提交回复
热议问题