我在Jenkins中構建ASP.NET 5時遇到問題。該錯誤消息如下:與Jenkins構建ASP.NET 5項目,找不到dnx運行時
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
我在安裝Visual Studio 2015的同一臺機器上安裝Jenkins。我嘗試了一個控制檯應用程序,它可以在Jenkins中編譯和測試。
我發現Dnx運行時在C:\ Users \ .dnx \ runtims \文件夾下,而不是C:\ Windows \ system32 \ config \ systemprofile.dnx \ runtimes。實際上,文件夾systemprofile中沒有.dnx \ runtimes。我試圖刪除C:\ Users \ .dnx \ runtims \中的所有runtion,然後運行dnvm update來重新安裝運行時。但是,沒有什麼特別的事情發生。所有的運行時間再次安裝到C:\ Users \ .dnx \ runtims \。有什麼方法可以將運行時路徑指向C:\ Users \ .dnx \ runtims \?
任何人都可以幫助看看如何解決這個問題?謝謝
這實在是一個評論,而不是一個答案。有了更多的代表,[你將能夠發表評論](// stackoverflow.com/privileges/comment)。 – manetsus
這是真的,我試圖添加評論,但我沒有足夠的聲譽做到這一點:( – Emma
謝謝艾瑪這個有價值的評論。 – Ben