Visual Studio 2019 build errors

I have API project (.NET Framework 4.6) that contains a lot of different controllers, nuget packages, swagger, EF etc.
If i load this project & make a build – everything succeeded (No issue found) and i can deploy my project to DevOps. However if i add atliest one line of code & make a build i get more that 6000 errors.
I already tried to clean & rebuild my project but this does not help.

Visual Studio 2019 build errors

Some of those 6000 exeptions:

  • Consider merging the types defined in ‘WebsiteApi’ with another namespace.
  • Because the behavior of ‘string.Format(string, object, object, object)’ could vary based on the current user’s locale settings, replace this call in ‘CampusController.GetExternal()’ with a call to ‘string.Format(IFormatProvider, string, params object[])’. If the result of ‘string.Format(IFormatProvider, string, params object[])’ will be displayed to the user, specify ‘CultureInfo.CurrentCulture’ as the ‘IFormatProvider’ parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify ‘CultureInfo.InvariantCulture’.
  • In member ‘Controller.GetItems(DateTime, bool)’, correct the casing of ‘B’ in parameter name ‘B2B’ by changing it to ‘b’.
  • Modify ‘CompanyController.GetCompany(Guid)’ to catch a more specific exception than ‘Exception’ or rethrow the exception.

My workaround is: add code -> make build -> build will not succeded -> save project -> close VS -> open project again -> build = build succeeded.


Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

Update from VS 16.8.3 to VS 16.9.0 solved this issue.

For some reason VS 16.8.3 treat CA warnings as errors even if its set Properties > Build > Treat warnings and errors = None”


All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x