【发布时间】:2019-02-06 14:05:00
【问题描述】:
我有一个 net472 项目,其中包含使用 xUnit 的单元测试,我在 VS 2017 中开发该项目。该项目包含 ASP.NET Core 项目的测试。
我已使用 Visual Studio 将其 packages.config 迁移到 PackageReference 样式。迁移后它仍然在 VS 中构建,但是使用 MSBuild 构建被破坏了。我收到以下错误:
Project "<solution-file-path>.sln" (2) is building "<project-file-path>.csproj" (14) on node 1 (default targets).
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\NuGet\15.0\Microsoft.NuGet.targets(186,5): error : Your project file doesn't list 'win-x64' as a "RuntimeIdentifier". You should add 'win-x64' to the "RuntimeIdentifiers" property in your project file and then re-run NuGet restore. [<project-file-path>.csproj]
Done Building Project "<project-file-path>.csproj" (default targets) -- FAILED.
谁有提示可能是什么原因?
【问题讨论】:
-
您有一个
net472项目要测试(当然还有参考)core项目?他怎么可能编译?
标签: asp.net-core msbuild visual-studio-2017 nuget xunit