Does anyone know of a way to view all compiler warnings for a VB.NET project?

与世无争的帅哥 提交于 2019-11-30 13:41:28
Mark Hurd

As of VB11, in VS2012, vbc no longer has a maximum error limit when called from the command line.

There's probably a better link for this now, but this will do until I find one.

UPDATE: new link

The official answer is apparently "No." From Microsoft: "While this issue does exist, the Visual Basic Compiler Team has decided to leave the hard limit to the reported errors because it helps with performance."

You should read Configuring Warnings in Visual Basic and How to: Enable or Disable Compiler Warnings

For example, you can to the compiler options (under the project build properties) the following line

warnaserror:42206

this should (I haven't tried it myself...) disable your 100 errors limit.

On another note, 100 warnings is a very large number. You should probably go over your code, check and fix the reasons to those warnings.

I've had the same problem with SQL projects I've been working on; the limit is 200 warnings. Then as I fix them, new ones merge in so the number never goes down!

I found that if you look in the "Build" output in the "Output" tab you can see everything. In my case I have thousands. Just select all and copy/paste it into a text editor.

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