How to get Visual Studio Intellisense errors from command-line

Viewed 228

We have a build process that uses MSBuild to compile our solution. When I compile that way, there are no errors in the build. But when I execute a build from inside of Visual Studio, in the Error List tab, I have about 20 errors when I display "Build + IntelliSense".

Is there a way to get that same error list from a command line utility? It is not currently part of the MSBuild output (these errors are not in the Output tab either).

1 Answers

Is there a way to get that same error list from a command line utility? It is not currently part of the MSBuild output (these errors are not in the Output tab either).

For now msbuild can't get same error list like what Build + IntelliSense provides. To get same warnings you can try using csc.exe directly from command-line.

Roslyn(Roslyn=>csc.exe) is not only the C# compiler, but also the API for code analyzing. In my test, it can display more warnings than msbuild. (Such as CS0168, msbuild won't output this warning)

Related