【发布时间】:2016-03-01 01:26:51
【问题描述】:
我在 Jenkins 中构建 ASP.NET 5 时遇到问题。错误信息如下:
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
Build started 1/03/2016 12:14:47 PM.
Project "C:\Program Files (x86)\Jenkins\jobs\TestWebsite\workspace\TestWebsite.sln" on node 1 (Rebuild target(s)).
ValidateSolutionConfiguration:
Building solution configuration "Release|Any CPU".
The target "BeforeGenerateProjectPriFile" listed in a BeforeTargets attribute at "C:\Program Files (x86)\MSBuild\Microsoft\NuGet\Microsoft.NuGet.targets (186,61)" does not exist in the project, and will be ignored.
Project "C:\Program Files (x86)\Jenkins\jobs\TestWebsite\workspace\TestWebsite.sln" (1) is building "C:\Program Files (x86)\Jenkins\jobs\TestWebsite\workspace\src\TestWebsite\TestWebsite.xproj" (2) on node 1 (Rebuild target(s)).
GetRuntimeToolingPathTarget:
Cannot find DNX runtime dnx-clr-win-x86.1.0.0-rc1-update1 in the folder: C:\Windows\system32\config\systemprofile\.dnx\runtimes
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DNX\Microsoft.DNX.targets(126,5): error : The Dnx Runtime package needs to be installed. See output window for more details. [C:\Program Files (x86)\Jenkins\jobs\TestWebsite\workspace\src\TestWebsite\TestWebsite.xproj]
Done Building Project "C:\Program Files (x86)\Jenkins\jobs\TestWebsite\workspace\src\TestWebsite\TestWebsite.xproj" (Rebuild target(s)) -- FAILED.
Done Building Project "C:\Program Files (x86)\Jenkins\jobs\TestWebsite\workspace\TestWebsite.sln" (Rebuild target(s)) -- FAILED.
我尝试了The Dnx Runtime package needs to be installed. See output window for more details中的方法,但无法解决问题。
C:\Windows\System32\config\systemprofile>dnvm list
Active Version Runtime Architecture OperatingSystem Alias
------ ------- ------- ------------ --------------- -----
1.0.0-rc1-update1 clr x64 win
*1.0.0-rc1-update1 clr x86 win default
1.0.0-rc1-update1 coreclr x64 win
1.0.0-rc1-update1 coreclr x86 win
我将 Jenkins 安装在安装了 Visual Studio 2015 的同一台机器上。我尝试了一个控制台应用程序,它可以在 Jenkins 中编译和测试。
我发现 Dnx 运行时位于 C:\Users\.dnx\runtims\ 文件夹下,而不是 C:\Windows\system32\config\systemprofile.dnx\runtimes。实际上,文件夹 systemprofile 中没有 .dnx\runtimes。我试图删除 C:\Users\.dnx\runtims\ 中的所有运行,然后运行 dnvm update 以重新安装运行时。然而,并没有发生什么特别的事情。所有运行时都再次安装到 C:\Users\.dnx\runtims\。有什么方法可以将运行时路径指向 C:\Users\.dnx\runtims\?
谁能帮忙看看如何解决这个问题?谢谢
【问题讨论】: