VB.Net editor removes one line of code every time debug is started

a 夏天 提交于 2019-12-25 07:48:43

问题


I'm using Visual Studio 2015 Community Edition and my problem is - every time when I click debug, one line of code is moved to the right of the previous line from the current file being edited. Some of my coworkers have seen this behavior too. C# works fine. It happens only in VB.NET with all file types: web.config, .vb, .aspx. This causes a problem because the line is removed after the project is compiled, so the debugger can never hit breakpoint because it says that the source code is different from the original that was before compilation.

Before Debug Click

After Debug Click


回答1:


Your issue looks quite similar to one described here, so try a workaround:

In my case, the linke break problem only happens if you have DevExpress components AND the Licences.licx file exists in you project. Emptying the licences.licx file in a pre-build event fixes the problem and resharper no longer removes a line break.




回答2:


If it works well in safe mode, it would be related to the extension tools/add-ins in your VS, as you said that you installed certain extension tools like Resharper or others, you could disable/remove them one by one under TOOLS->Extensions and Updates, so it could help us narrow down this issue:)



来源:https://stackoverflow.com/questions/41627447/vb-net-editor-removes-one-line-of-code-every-time-debug-is-started

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!