开发者

Can Edit & Continue work for VS 2010, ASP.Net MVC application on a 64-bit Windows 7 OS? [duplicate]

This question already has answers here: Edit and Continue does not Work in VS 2010 / ASP.Net MVC 2 (4 answers) Closed 9 years ago.

I have Visual Studio 2010, on a 64-bit OS, and a large solution with multiple projects. The main one is an ASP.NET MVC 3 project.

I am trying to enable "Edit and Continue" but I'm not having any luck. I have followed all the steps outlined here:

http://hobby.keluargareski.net/2010/05/17/how开发者_Go百科-to-enable-edit-and-continue-in-visual-studio/

and have targeted x86 in all my projects. I receive a dialog box stating:

"Changes are not allowed if the assembly has not been loaded"

Has anyone had any success with a similar setup? Is this even possible?


Check to make sure you're not debugging. I got this error as well then I realized it was debugging. Either stop debugging or detach then make your changes.


The message "Changes are not allowed if the assembly has not been loaded" means that the code you're trying to change is not in an assembly visual studio can find/has built. Maybe you're trying to debug a class which is not compiled into the binary. When you have multiple projects and the class you are trying to debug is in one which is not set for building in that configuration. Go to Debug -> Configuration Manager and verify you have the check box ticked for the project you're debugging.

Check the output path of your binaries and make sure they all go to a directory which can be found by the calling assembly, i.e. you can try putting all assemblies to the same directory.

Also you can refresh your references to the project in question by removing a reference and then adding it back, as visual studio can sometimes be buggy in this way.

Hope this helps, as it's quite a generic problem you're having.


Generic problem is right :( I haven't figured it out in one of my Solutions, but in another I did finally find out what I was doing "wrong".

My Solution has a Project for Windows, and a Project for WindowsPhone. My problem was that the auto-load for recently edited files was loading my code files from my WindowsPhone project rather than my Windows project. So, when I would pause my code in Windows, it wouldn't let me Edit&Continue because the code file "belongs to a different project". So, I closed the code file, and then re-opened it from my Windows project. Finally it let me do Edit&Continue.

Now I have to figure out why my other Solution doesn't work for E&C.


I suffered this problem for a while. This post http://sciagaprogramisty.blogspot.com/2012/09/changes-are-not-allowed-if-assembly-has.html solved it for me... specifically the last image, which instructs you to change your output path to just "bin\"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜