Solved

Edit and Continue not working in VS2013 Ultimate

Posted on 2015-01-05
12
307 Views
Last Modified: 2015-01-08
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
Comment
Question by:codequest
  • 6
  • 4
  • 2
12 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 40533442
What is the indication that the Edit and Continue is not working?  Do you get a dialog box?  Compile error?
0
 
LVL 13

Expert Comment

by:Corey2
ID: 40533556
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
 
LVL 2

Author Comment

by:codequest
ID: 40533978
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
 
LVL 13

Expert Comment

by:Corey2
ID: 40534005
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
 
LVL 2

Author Comment

by:codequest
ID: 40534030
I'll try that, thanks;  could be later today.
0
 
LVL 13

Expert Comment

by:Corey2
ID: 40534201
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 2

Author Comment

by:codequest
ID: 40534471
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
 
LVL 2

Author Comment

by:codequest
ID: 40534613
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
 
LVL 2

Author Comment

by:codequest
ID: 40534848
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
 
LVL 96

Assisted Solution

by:Bob Learned
Bob Learned earned 250 total points
ID: 40535749
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
 
LVL 13

Accepted Solution

by:
Corey2 earned 250 total points
ID: 40535776
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
 
LVL 2

Author Comment

by:codequest
ID: 40538484
@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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now