VS2013 - Operation Could Not Be Completed

后端 未结 16 2129
被撕碎了的回忆
被撕碎了的回忆 2020-12-05 23:18

After installing Visual Studio 2013 and playing around with some of the new features, I noticed I\'m unable to open a cshtml file in one of my MVC projects. If I try openin

相关标签:
16条回答
  • 2020-12-05 23:48

    Found a working solution here (tested with VS2015 Update 1):

    https://github.com/aspnet/Tooling/issues/276#issuecomment-166650817

    1. Close VS
    2. Delete the content of %LocalAppData%\Microsoft\VisualStudio\14.0\ComponentModelCache
    3. Open VS
    0 讨论(0)
  • 2020-12-05 23:48

    I also got this problem after using some Nuget package. The problem was a duplicate of appSettings. I merged them all and it worked.

    0 讨论(0)
  • 2020-12-05 23:51

    Just found your question here because it happened to me as well. Here's what I did and hopefully it will fix / help find the problem.

    1. Deleted all .suo
    2. Terminate IIS Express
    3. Close VS2013 and re-open
    4. Open your project and try to start it (F5)
    5. You probably have an error on your web.config file. For me it was an <appSettings> being there twice.
    6. Fixed the web.config file, save and boom, error is gone.

    Hope it will also fix your situation.

    0 讨论(0)
  • 2020-12-05 23:51

    I had error in my web.config file, there was two spaces before <xml> tag. after removing it stopped showing this error.

    0 讨论(0)
  • 2020-12-05 23:51

    In my case, the problem was due to my web.config's app settings include pointing to a file that doesn't exist:

    <appSettings configSource="App_Config\MISSPELT-FILENAME.config" />
    
    0 讨论(0)
  • 2020-12-05 23:52

    There is also this thread that an MS employee has answered with possible cause:

    This is a bug in the debugger. There is a race condition that happens when all of the following are true:

    Script debugging is enabled in IE User is debugging IE and another process

    The other process stops (hits breakpoint, step operation completes, stops at an exception, etc) at a moment when IE is not running script code

    IE starts running script code at roughly the same moment that the user hits F10/F5 in Visual Studio.

    The most likely reason for this to happen is that the code from 'setTimeout' is run, but I am not a JScript expert, so I am sure there are other possible reasons as well.

    and these workarounds:

    1. If you hit this problem, I believe you could detach the debugger and then re-attach.

    -or-

    1. This problem happens when debugging ASP.NET and when script debugging is enabled in IE. If you disable script debugging in IE, or toggle it on and off when switching between debugger server-side and client-side problems, you would be able to work around the issue.

    -or-

    1. If your web application is using setTimeout, you may be able to avoid or at least reduce the problem by doing something to ensure that script runs less often. This could mean increasing the timeout value, or this could mean adding conditions around when setTimeout is used.
    0 讨论(0)
提交回复
热议问题