How to disable warnings in only one project?

后端 未结 4 357
日久生厌
日久生厌 2021-01-03 19:27

I have a legacy project in my solution without comments and many warnings. I want to not see warnings about this specific project but I want to see warnings of the other pro

相关标签:
4条回答
  • 2021-01-03 19:30
    1. In Visual Studio open the project's Properties tab
    2. Go to the "Build" tab
    3. Set the "Warning Level" to 0

    For details on the different warning levels see:

    C# Compiler Options > /warn (Specify Warning Level)

    0 讨论(0)
  • 2021-01-03 19:35

    Open the Properties of the project and go to the Build page.
    Here you will find the Error & Warnings input box
    Put the warning number to hide in the input box without the first two letters
    If you have more than one warning separate them with colon or semi-colon

    (Sorry if labels are not precise, I'm translating from another language VS)

    0 讨论(0)
  • 2021-01-03 19:35

    Each project in Visual Studio has a "treat warnings as errors" option. Go through each of your projects and change that setting:

    1. Right-click on your project, select "Properties".
    2. Click "Build".
    3. Switch "Treat warnings as errors" from "All" to "Specific warnings" or "None".
    0 讨论(0)
  • 2021-01-03 19:52

    Open project properties. Build > Errors and warnings > Warning level

    Select 0 warning level. Details you can read here.

    0 讨论(0)
提交回复
热议问题