vb.netvisual-studio-2013edit-and-continue

Edit and Continue problems with VS 2013


Recently Edit and Continue with VB.net has been kinda flaky.

In one project in particular. It was working as expected the last time I touched this project.

Recently when I pause the project while the winform message pump is running, I get a message saying no code is running. When I go back to my class file (in the same project, not external) I cannot make any changes - typing does nothing in the editor.

I have another class which is part of this solution, it has no entry point but I thought I would remind VS which was the startup project. This made edit and continue seem to work. I could make changes in the code, but when I continued the old version of the code was what was actually running. It's as if I am in an external class.

I just noticed something else, when you first start the project, edit and continue seems to work fine. After you continue, if you break the code again, it stops working.

I never had edit and continue problems at all with VS2012.

VS was hanging and crashing a lot yesterday so I rebooted my computer. That did not help this problem. I also installed SP1 and that did not fix anything.

I tried compiling to X86 and Any CPU.

Is there a setting I am missing? How can I get this working?

Thanks, Brad


Solution

  • I tried a few more things based on some suggestion in other forums.

    I repaired VS, I reinstalled VS, I tried to restore my default settings. None worked. I tried a simple project to duplicate the issue that I could share to get feedback. I could not get it to not work.

    So assuming then the problem was with my project and not VS I made a new project and brought over my forms, modules and classes from project with the problem. I added my references and... edit and continue now works! The only things I changed from the default project were: Target CPU: x86, and Target Framework: .Net Framework 4

    I still do not know if there was some corruption or it was a bad setting. This project was originally ported from VB6 many years ago and has been through a few VS upgrades as well.