none
How to Fix this FxCop Warning and what is best Code Analysis for Visual Studio. RRS feed

  • Question

  • How to Fix this FxCop Warning and what is best Code Analysis for Visual Basic 2019.

    Please Help

    Thank You..


    RohanD


    • Edited by RAT_SL Thursday, August 1, 2019 5:41 PM
    Thursday, August 1, 2019 5:40 PM

Answers

  • Hello,

    See the following report.

    Other options

    https://github.com/dotnet/roslyn-analyzers#other-analyzer-packages


    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

    • Marked as answer by RAT_SL Wednesday, August 7, 2019 7:45 PM
    Thursday, August 1, 2019 6:11 PM
    Moderator
  • Thank you for the reply. Can you please tell me how can I find and edit XML file like this.

    "If you've installed FxCop analyzers but continue to get warning CA0507 ""Run Code Analysis" has been deprecated in favor of FxCop analyzers, which run during build", you may need to set the RunCodeAnalysis msbuild property in your project file to false. Otherwise, static code analysis will execute after each build."


    RohanD

    Hi,

    see the following link:

    https://docs.microsoft.com/en-us/visualstudio/code-quality/fxcop-analyzers-faq?view=vs-2019

    Best Regards,

    Alex


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by RAT_SL Wednesday, August 7, 2019 7:45 PM
    Monday, August 5, 2019 7:59 AM
  • Thank you for the reply. Can you please tell me how can I find and edit XML file like this.

    "If you've installed FxCop analyzers but continue to get warning CA0507 ""Run Code Analysis" has been deprecated in favor of FxCop analyzers, which run during build", you may need to set the RunCodeAnalysis msbuild property in your project file to false. Otherwise, static code analysis will execute after each build."


    RohanD

    Try using

    Public Class Form1
    #Disable Warning CA0507
    
    End Class
    


    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

    • Marked as answer by RAT_SL Wednesday, August 7, 2019 7:46 PM
    Monday, August 5, 2019 2:44 PM
    Moderator

  • Thank you for the reply. but, I need to know how can I edit XML file like this. I dont know how to find the XML file. 

    The XML file in question is the *.vbproj file for your project.

    It may not be necessary for you to edit it "by hand". In the Project Properties
    for your project there is a category on the left for Code Analysis. If you open
    that it should show a checkbox for "Enable Code Analysis on Build". If that is
    checked then your project file will have an entry:

    <RunCodeAnalysis>true</RunCodeAnalysis>

    If it is unchecked then it should have an entry:

    <RunCodeAnalysis>false</RunCodeAnalysis>

    - Wayne

    • Marked as answer by RAT_SL Wednesday, August 7, 2019 7:46 PM
    Monday, August 5, 2019 7:25 PM

All replies

  • Hello,

    See the following report.

    Other options

    https://github.com/dotnet/roslyn-analyzers#other-analyzer-packages


    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

    • Marked as answer by RAT_SL Wednesday, August 7, 2019 7:45 PM
    Thursday, August 1, 2019 6:11 PM
    Moderator
  • Thank you for the reply. Can you please tell me how can I find and edit XML file like this.

    "If you've installed FxCop analyzers but continue to get warning CA0507 ""Run Code Analysis" has been deprecated in favor of FxCop analyzers, which run during build", you may need to set the RunCodeAnalysis msbuild property in your project file to false. Otherwise, static code analysis will execute after each build."


    RohanD

    Thursday, August 1, 2019 6:17 PM
  • Thank you for the reply. Can you please tell me how can I find and edit XML file like this.

    "If you've installed FxCop analyzers but continue to get warning CA0507 ""Run Code Analysis" has been deprecated in favor of FxCop analyzers, which run during build", you may need to set the RunCodeAnalysis msbuild property in your project file to false. Otherwise, static code analysis will execute after each build."


    RohanD

    Hi,

    see the following link:

    https://docs.microsoft.com/en-us/visualstudio/code-quality/fxcop-analyzers-faq?view=vs-2019

    Best Regards,

    Alex


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by RAT_SL Wednesday, August 7, 2019 7:45 PM
    Monday, August 5, 2019 7:59 AM
  • Hi Alex, 

    Thank you for the reply. but, I need to know how can I edit XML file like this. I dont know how to find the XML file. 


    RohanD

    Monday, August 5, 2019 10:58 AM
  • Thank you for the reply. Can you please tell me how can I find and edit XML file like this.

    "If you've installed FxCop analyzers but continue to get warning CA0507 ""Run Code Analysis" has been deprecated in favor of FxCop analyzers, which run during build", you may need to set the RunCodeAnalysis msbuild property in your project file to false. Otherwise, static code analysis will execute after each build."


    RohanD

    Try using

    Public Class Form1
    #Disable Warning CA0507
    
    End Class
    


    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

    • Marked as answer by RAT_SL Wednesday, August 7, 2019 7:46 PM
    Monday, August 5, 2019 2:44 PM
    Moderator

  • Thank you for the reply. but, I need to know how can I edit XML file like this. I dont know how to find the XML file. 

    The XML file in question is the *.vbproj file for your project.

    It may not be necessary for you to edit it "by hand". In the Project Properties
    for your project there is a category on the left for Code Analysis. If you open
    that it should show a checkbox for "Enable Code Analysis on Build". If that is
    checked then your project file will have an entry:

    <RunCodeAnalysis>true</RunCodeAnalysis>

    If it is unchecked then it should have an entry:

    <RunCodeAnalysis>false</RunCodeAnalysis>

    - Wayne

    • Marked as answer by RAT_SL Wednesday, August 7, 2019 7:46 PM
    Monday, August 5, 2019 7:25 PM