[英]MSBuild is being run from within the "Visual Studio Command Prompt"
I am using VS2017 Enterprise for first the time building my repository.我第一次使用 VS2017 Enterprise 构建我的存储库。 Have cloned code from my VS repository and trying to build it but build failed.
从我的 VS 存储库中克隆代码并尝试构建它但构建失败。 And also i have set environment variable path --> PATH: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe
我还设置了环境变量路径 --> PATH: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe
Error message:错误信息:
Severity Code Description Project File Line Suppression State Error MSBuild could not locate the Code Analysis tool at 'Drive:\Repo\NugetPackages\CarbonV2.FxCop.SDL.14.0.23107.0\Tools\FxCopCmd.exe'.
严重性代码说明项目文件行抑制 State 错误 MSBuild 无法在“Drive:\Repo\NugetPackages\CarbonV2.FxCop.SDL.14.0.23107.0\Tools\FxCopCmd.exe”中找到代码分析工具。 If MSBuild is being run from within the "Visual Studio Command Prompt", specify the path to the Code Analysis tool by setting the FXCOPDIR environment variable.
如果 MSBuild 从“Visual Studio 命令提示符”中运行,请通过设置 FXCOPDIR 环境变量指定代码分析工具的路径。 Demo.Service.Common
演示.Service.Common
Could you please help on this, did i missed any thing?你能帮忙解决这个问题吗,我错过了什么吗?
What's standing out to me is that i'm seeing NugetPackages - leading me to believe you're missing something from Nuget.对我来说最突出的是我看到了 NugetPackages - 让我相信你从 Nuget 中遗漏了一些东西。
https://learn.microsoft.com/en-us/nuget/consume-packages/package-restore#restore-packages-automatically-using-visual-studio https://learn.microsoft.com/en-us/nuget/consume-packages/package-restore#restore-packages-automatically-using-visual-studio
You can install the FXCOP manually, or follow the instructions in that article to have NuGet attempt to get all of the missing packages automatically for you.您可以手动安装 FXCOP,或按照该文章中的说明让 NuGet 尝试自动为您获取所有缺少的包。 Hope this helps!
希望这可以帮助!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.