• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 403
  • Last Modified:

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
http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/Q_28379521.html

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!
0
codequest
Asked:
codequest
  • 6
  • 4
  • 2
2 Solutions
 
Bob LearnedCommented:
What is the indication that the Edit and Continue is not working?  Do you get a dialog box?  Compile error?
0
 
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:

http://stackoverflow.com/questions/20324080/visual-studio-2013-net-4-5-1-edit-and-continue-64-bit-not-working

"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.
"
0
 
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?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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.
0
 
codequestAuthor Commented:
I'll try that, thanks;  could be later today.
0
 
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:"
0
 
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
0
 
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?
0
 
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?
0
 
Bob LearnedCommented:
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.
0
 
Corey ScheichDeveloperCommented:
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
WebApplication1.zip
0
 
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!
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

  • 6
  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now