如何从命令行获取 Visual Studio 智能感知错误
How to get Visual Studio Intellisense errors from command-line
我们有一个使用 MSBuild 来编译我们的解决方案的构建过程。当我以这种方式编译时,构建中没有错误。但是当我从 Visual Studio 内部执行构建时,在“错误列表”选项卡中,当我显示“构建 + IntelliSense”时,我有大约 20 个错误。
有没有办法从命令行实用程序中获取相同的错误列表?它当前不是 MSBuild 输出的一部分(这些错误也不在“输出”选项卡中)。
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).
目前 msbuild 无法获得 相同的 错误列表,就像 Build + IntelliSense
提供的那样。要获得相同的警告,您可以尝试从 command-line.
using csc.exe directly
Roslyn(Roslyn=>csc.exe)不仅是C#编译器,还是代码分析的API。在我的测试中,它可以显示比 msbuild 更多的警告。 (比如CS0168,msbuild不会输出这个警告)
我们有一个使用 MSBuild 来编译我们的解决方案的构建过程。当我以这种方式编译时,构建中没有错误。但是当我从 Visual Studio 内部执行构建时,在“错误列表”选项卡中,当我显示“构建 + IntelliSense”时,我有大约 20 个错误。
有没有办法从命令行实用程序中获取相同的错误列表?它当前不是 MSBuild 输出的一部分(这些错误也不在“输出”选项卡中)。
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).
目前 msbuild 无法获得 相同的 错误列表,就像 Build + IntelliSense
提供的那样。要获得相同的警告,您可以尝试从 command-line.
Roslyn(Roslyn=>csc.exe)不仅是C#编译器,还是代码分析的API。在我的测试中,它可以显示比 msbuild 更多的警告。 (比如CS0168,msbuild不会输出这个警告)