VB.Net 编辑器每次启动调试都会删除一行代码 [英] VB.Net editor removes one line of code every time debug is started

查看:20
本文介绍了VB.Net 编辑器每次启动调试都会删除一行代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 Visual Studio 2015 社区版,我的问题是 - 每次单击调试时,都会将一行代码从正在编辑的当前文件移到上一行的右侧.我的一些同事也看到了这种行为.C# 工作正常.它只发生在 VB.NET 的所有文件类型中:web.config、.vb、.aspx.这会导致一个问题,因为该行在项目编译后被删除,因此调试器永远无法命中断点,因为它说源代码与编译前的原始代码不同.

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.

调试前点击

调试后点击

推荐答案

您的问题看起来与描述的很相似 此处,因此请尝试解决方法:

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

就我而言,链接中断问题仅在您有DevExpress 组件和 Licenses.licx 文件存在于您中项目.在预构建事件修复中清空 licences.licx 文件问题和 resharper 不再删除换行符.

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.

这篇关于VB.Net 编辑器每次启动调试都会删除一行代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆