Edit and Continue not working in VS2013 Ultimate

In Win7 Pro, VS2013 Ultimate, in an ASP.NET VB.NET website, I was using Edit and Continue with no problems for many months, then a couple/few weeks ago it stopped working.

The only significant change that I can see is that I started working with OpenXML, however, only in one website;  the problem has extended to my other websites/projects as well.  

I've tried various solutions found on the web, including
> resetting the tools > debug > enable edit and continue option,
> turning off Intellitrace.
and this

The one fix I've got is to delete the solution file from the website.   However, then I lose various settings, plus the solution file regenerates and the problem comes back.

Any suggestions on this would be appreciated.  Thanks!
Who is Participating?
Corey ScheichConnect With a Mentor DeveloperCommented:
You can do what you think best it won't be a problem for me.

Before you do I wanted to mention that I created an WebApplication project with an asp page and was able to edit and continue I used mixed .Net references and was still able to.  However I don't think I have all the web side installed so I was unable to open your solution to see if that was a problem with edit and continue here.

Had to change 2 Settings.Settings files and SLN and SUO file to have .txt after them
Bob LearnedCommented:
What is the indication that the Edit and Continue is not working?  Do you get a dialog box?  Compile error?
Corey ScheichDeveloperCommented:
I've run into edit and continue issues in x64 environments due to referencing .Net 2.0 runtime projects in win-form projects it complains that edit and continue is not available on x64 projects which was the case in vs2012 but is now not true for vs2013.  To correct the issue you must add a node to the project that is referencing the .Net 2.0 assembly.

Credit to David Kean for the solution below:


"This is a known issue when referencing portable libraries and using Edit & Continue. We are looking to fix this in a future version of Visual Studio.

A workaround for now:

Right-click on the project with the issue in Solution Explorer and choose Unload
Right-click on the unloaded project and choose Edit
Within the body of the first <PropertyGroup> element, add the following: <_ResolveReferenceDependencies>true</_ResolveReferenceDependencies>
Reload the project saving changes
This should fix the build issue.

Note: Depending on the project, this might have a performance hit, not only during Edit & Continue usage, but just general usage within VS.
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

codequestAuthor Commented:
Thanks for the responses.  
@TheLearnedOne:  the symptom is that when the website is in debug/run mode, I can't edit codebehind or code class files;  it won't take the keystrokes.  I *can* edit aspx, css and javascript files, just not the code.  The issue is that when I'm looking at form behavior in debug/run mode, I want to be able to change the code on the spot, while I'm observing the behavior, instead of dropping out of debug, changing the code and rebuilding.  While I can't run the code I've changed, I have the cognitive association of the code with the screen behavior, which is of enormous help for my coding skills.

@Corey2:  your suggestion looked good, however, my "project" is a website, and when I right click on the project within the solution, there is no "unload" option.  Maybe it's something else in 2013?  Also there is no project file, only a solution file, in the website folder. I was able to open the Solution file in NotePad++, and add the line you suggested (which does not have XML, but just a list of "property =" statements.  However, that probably wasn't the fix needed, and did not work in any case.

Again the only fix I have is to start the app via "open website", which bypasses the solution file.  If I open via solution file, then those settings are taken up in memory, apparently, and deleting the solution file at that point won't help.  Again, I lose the development settings of which code files were open, bookmarks, etc.  But not as bad as not being able to do Edit and Continue.

Seems strange that Edit and Continue was working for a long time and then stopped.  Also seems highly indicative of something that deleting the solutions file fixes the problem.

Any other ideas?
Corey ScheichDeveloperCommented:
Could you un-reference OpenXML (is the reference DocumentFormat.OpenXML.dll) to see if the reference is the cause of your issue.  I just checked and that is compiled for .Net framework 2.0 meaning the issue may be the same as I have had with Win-Forms however the solution must be different for a website solution.
codequestAuthor Commented:
I'll try that, thanks;  could be later today.
Corey ScheichDeveloperCommented:
I did a little testing and I don't know that I produced your exact issue but I did receive a nice message with a list of items to check.  Make sure you don't have any of these situations going on.

Screen Shot "Changes are not allowed in the following cases:"
codequestAuthor Commented:
Thanks for that note.  RE the un-referencing of OpenXML, it turns out there isn't a reference to that, it's just an Imports statement, and a required reference to Windows.Base. If I take out the Windows.Base the rest of the code generates lots of compile errors, so test is unfeasible.

I built a little test website, one form, no references, and it has the same problem.  It is attached below.   EE won't upload the .sou (solution) files, so they are named as follows (they have to be changed back to the original name to work in testing).

original name                            name in zip
0005_EnCTest.v12.sou             0005_EnCTest-v12-sou.txt
0005_EnCTest.sou                     0005_EnCTest-sou.txt

Also below are the Edit and Continue settings.  

Edit and Continue Settings0005-EnCTest.zip.zip
codequestAuthor Commented:
After doing some research, I'm thinking that this is not really Edit and Continue.  This is just editing during debug.  

From what I'm reading, Edit and Continue is an actual dynamic recompilation, producing an effect like you would get with VBA (though not the same thing).  And that websites are not "smart" enough to support Edit and Continue.

So it seems like the solutions file has something in it that prevents edit during debug.  Now, it's possible that I've been deluding myself that I've been able to do that all along, however, the change in behavior is too strong...I want to do editing during debug, I expect to be able to, and now I can't.

So, does that suggest a different approach?
codequestAuthor Commented:
Since this turned out to be a poorly formed question, I'm thinking of deleting it and starting over.  Any problems with that, or alternative suggestions?
Bob LearnedConnect With a Mentor Commented:
Edit and Continue seems to be a buggy process, that is easily knocked off its track.

1) I never use a Web Site model solution (no project file), since you have very little control over anything.

2) I believe that you said that you were debugging a web site without a project file.

3) I would try a test with a Web Application model, where you create a project file, and see if you can Edit and Continue.

4) It is important to remember that Edit and Continue on a 64-bit O/S is new to VIsual Studio 2013, and I have seen where it doesn't work all the time.  I have an MVC 5 web site, where I can't use Edit and Continue.

5) I would think about build configuration (Debug vs. Release mode), and make sure that you are in the Debug mode, so you can have a break point, since Edit and Continue won't work without being in break mode.
codequestAuthor Commented:
@Corey2:  yep, I got edit and continue to work on my simple site example also.  I'm going to split points here and ask another question or two (or three) on converting to web application.  Thanks!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.