【问题标题】:Build ASP.NET 5 project with Jenkins, cannot find dnx runtime使用 Jenkins 构建 ASP.NET 5 项目,找不到 dnx 运行时
【发布时间】: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\?

谁能帮忙看看如何解决这个问题?谢谢

【问题讨论】:

    标签: c# asp.net jenkins


    【解决方案1】:

    我已经通过更改登录用户解决了这个问题。我在服务中右键单击 Jenkins 并选择属性。然后在登录标签中,将此帐户设置为具有管理员权限的用户。

    【讨论】:

      【解决方案2】:

      只是对 Ben 的回答的补充,我遇到了同样的问题,并通过更改 jenkins 服务的登录帐户尝试了 Ben 的解决方案,它只有在我重新启动我的 jenkins 机器后才能工作。我不知道为什么,但还是把我的 cmets 留在这里,以防有人遇到与我相同的问题,这可能会节省他/她的时间。

      【讨论】:

      • 这真的是评论,而不是答案。多一点代表,you will be able to post comments.
      • 没错,我尝试添加 cmets,但我没有足够的声誉来做到这一点:(
      • 感谢 Emma 的宝贵意见。
      猜你喜欢
      • 1970-01-01
      • 2017-04-22
      • 1970-01-01
      • 1970-01-01
      • 2015-09-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多