6

I am unable to get "Edit and continue" to work in Visual Studio. It fails with the message "Changes are not allowed if the project wasn't built when debugging started".

I am debugging an ASP.Net Core (1.1.0) Web API app using .NET Framework 4.6.1 and Entity Framework 6.1.3.

I am using Visual Studio 2015 Enterprise Update 3 with IIS Express.

I have Edit and Continue enabled in Tools > Options > Degugging > Enable Edit and Continue.

I have IntelliTrace set to IntelliTrace events only in Tools > Options > IntelliTrace > General. Disabling IntelliTrace did not fix the problem.

I also added COMPLUS_FORCEENC=1 to system environment variables.

Any other ideas?

d ei
  • 493
  • 4
  • 16
  • I copied the project/solution to a different PC with a clean copy of Visual Studio 2015 Enterprise Update 3. Edit and Continue does not work there, either. It does work for a different ASP.Net MVC 5 solution. – d ei Feb 02 '17 at 15:36
  • Possible duplicate of [How to Edit and Continue in ASP.Net MVC 6](http://stackoverflow.com/questions/30632427/how-to-edit-and-continue-in-asp-net-mvc-6) – Steve Greene Feb 02 '17 at 17:10
  • I don't believe this is a duplicate of "How to Edit and Continue...". That was referring to a VS 2015 Release Candidate and the answer was "wait for VS 2015 Release". I'm using VS 2015 Update 3. – d ei Feb 03 '17 at 14:28

1 Answers1

2

Edit and Continue doesn't appear to be supported yet for .Net Core, at least in VS2015 U3. I've run into the exact same issue and while I can't find any concrete references for it, there seem to be hints in a number of places. Here are a couple of links that may support this claim:

https://github.com/dotnet/coreclr/issues/7902

https://github.com/dotnet/roslyn/pull/16197

I have yet to try VS2017 RC, perhaps the support is there for it there. If you've found anything else since posting I'd be delighted to hear about it.

pcdev
  • 2,852
  • 2
  • 23
  • 39
  • 2
    I am having trouble with edit and continue in vs2017 with ASP.Net Core MVC. I can stop on a break point and edit code but it does not behave as expected. For example, a new IF statement that should return true instead returns false or is skipped entirely. – Soenhay Feb 21 '18 at 19:18