CA0001: An unknown error occurred while running Code Analysis

0
1258

I use two IDEs. Or even more, if different versions are considered. So, there is Visual Studio 2019, VS 2022 PreView and recently JetBrains Rider 2021.2.1. One of the most annoying problems that I had when I switched from VS to Rider, was the error: CA0001: An unknown error occurred while running Code Analysis.

CA0001: An unknown error occurred while running Code Analysis
CA0001 error in JetBrains Rider IDE

Fortunately, my colleague from the office (thanks Marcin!) pointed that this is related to the selected MSBuild type. In order to resolve this issue one has to go to File->Settings->Build, Execution, Deployment->Toolset and Build and in the dropbox „Use MSBuild version” change MSBuild from „Auto detected (17.0)” (taken from VS2022 PV) to „16.0” (from VS2019).

CA0001: An unknown error occurred while running Code Analysis solution
Solution to CA0001

This simple operation not only removes „CA0001: An unknown error occurred while running Code Analysis” but also allows working with the WinForms without any issues. If you experienced similar problems, try to change MSBuild – maybe it will help?

0 0 votes
Article Rating
Subscribe
Powiadom o
guest
0 komentarzy
najstarszy
najnowszy oceniany
Inline Feedbacks
View all comments