none
Maximum number of warnings has been exceeded RRS feed

  • Question

  • Hi, 

    I faced an old-old issue of VB.NET compiler and VS - it is number of warnings limitation. 

    I've read somewhere that warnings are not limited any more when you use command line compilation. 

    I gave it a try with MsBuild 12 and it still gave me only 100  warnings - the same as studio does. 

    How big migrations are supposed to be done with this limitation? 
    Like turning Strict on, etc. 

    Regards,
    Alexander 



    Alexander Yaremchuk

    Thursday, November 21, 2019 1:31 PM

All replies

  • Hello,

    The first thought it to litigate the warnings by fixing as many as possible.

    You can suppress them too (unless you have already seen this and done some)

    https://docs.microsoft.com/en-us/visualstudio/ide/how-to-suppress-compiler-warnings?view=vs-2019#suppress-warnings-for-visual-basic


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Thursday, November 21, 2019 2:15 PM
    Moderator

  • I faced an old-old issue of VB.NET compiler and VS - it is number of warnings limitation. 

    I've read somewhere that warnings are not limited any more when you use command line compilation. 

    I gave it a try with MsBuild 12 and it still gave me only 100  warnings - the same as studio does. 


    On again, off again. See this thread:

    "Why am I getting “vbc : warning BC42206: Maximum number of warnings has 
    been exceeded” in Visual Studio 2013?"
    https://stackoverflow.com/questions/27028602/why-am-i-getting-vbc-warning-bc42206-maximum-number-of-warnings-has-been-exc

    - Wayne

    Thursday, November 21, 2019 2:18 PM
  • Well, in the past (FxCop and StyleCop) I disabled all warnings except the one I wanted to fix.. but this will not give you an overview. So this is suboptimal.

    I'm not sure, but I would look into SonarQube for static code analysis.

    Thursday, November 21, 2019 2:42 PM
  • It's pure laziness on the part of the developer or developers to not fix the warning messages a compiler is showing for a program, as I was told by other developers in a professional environment. 
    Thursday, November 21, 2019 11:16 PM
  • The problem is deeper than pure laziness. There are a a lot of developers out there, which don't understand the impact of a warning...
    Monday, November 25, 2019 10:10 AM

  • I've read somewhere that warnings are not limited any more when you use command line compilation. 

    I gave it a try with MsBuild 12 and it still gave me only 100  warnings - the same as studio does. 

    How big migrations are supposed to be done with this limitation? 

    My impression is that the OP is NOT complaining about all of the warnings and
    wanting less of them. Rather the complaint is that the version being used for
    the build stops *too soon*. The OP wants to see ALL of the warnings in a single
    build, not just the first 100 or so.

    As explained in the thread to which I posted a link, the 100 (or so) limit on the
    number of warnings from a build was removed. However it was (inadvertently?)
    resumed in the following major release. That mistake was corrected in later
    releases so now there should be no limit on the number of warnings shown from
    a single build.

    So I think the answer to the OP's question is contained in that thread I 
    referenced: use a different (preferably newer) version of MsBuild.

    - Wayne

    Monday, November 25, 2019 1:44 PM