問題描述
自從我設置構建服務器以來已經有一段時間了,所以也許我忘記了一些東西,或者 .NET 4.5 可能與我上次使用的任何版本不同,但這是我的問題.
Its been a while since I setup a Build Server so maybe I've forgotten something or maybe .NET 4.5 is different from whatever version I did this with last time, but here is my problem.
我正在嘗試設置構建服務器來監控源代碼控制存儲庫.每當發生變化時,我希望服務器拉取變化并構建項目.如果沒有錯誤,我想將站點部署到在構建服務器上運行的網站.
I'm trying to setup a build server to monitor a source control repository. Whenever something changes, I want the server to pull the changes and build the project. If there are no errors, I want to deploy the site to a web site running on the build server.
過去,當我這樣做時,我認為只安裝 .NET 就可以做到這一點,但是當我嘗試構建這個項目時,我收到一個錯誤C:Program FilesMSBuildMicrosoftVisualStudiov11.0WebApplicationsMicrosoft.WebApplication.targets" 不見了,如果我去看看,我可以看到它不見了.事實上,沒有 Visual Studio 11 目標文件.
In the past when I did this, I thought that I was able to do this having only .NET installed, but when I try to build this project I get an error that "C:Program FilesMSBuildMicrosoftVisualStudiov11.0WebApplicationsMicrosoft.WebApplication.targets" is missing, and if I go and look I can see that it is missing. In fact there are no Visual Studio 11 targets files.
經過深思熟慮和摸不著頭腦,我走出去得到了Windows 8/.NET 4.5 SDK",認為 .NET 4.5 SDK 可能會安裝我需要的目標文件,但除非我安裝了它才安裝莫名其妙地錯了.
After a lot of thought and head scratching, I went out and got the "Windows 8/.NET 4.5 SDK" thinking that the .NET 4.5 SDK might install the targets files that I needed, but it did not unless I installed it wrong somehow.
那么,我需要在構建服務器上放置什么才能構建項目.我寧愿不必安裝完整的 Visual Studio 2012.
So, what do I need to put on the Build Server in order to get the project to build. I would prefer not to have to install the full Visual Studio 2012.
推薦答案
我的問題與安裝有關Windows 2008 Box 上適用于 Windows 8 的 Windows 軟件開發工具包 (SDK).如果您在該頁面上進一步閱讀,您將看到標有Windows Vista 和 Windows Server 2008 上的 .NET Framework 4.5 SDK 工具"的標題.這告訴你:
My problem was related to installing the Windows Software Development Kit (SDK) for Windows 8 on a Windows 2008 Box. If you read further on the page, you will get to a heading labeled ".NET Framework 4.5 SDK Tools on Windows Vista and Windows Server 2008." This tells you to:
- 在受支持的操作系統(例如 Windows 7 或 Windows 8)上運行 Windows SDK for Windows 8 安裝程序.
- 在指定位置"屏幕上選擇以下選項:下載 Windows SDK 以在單獨的計算機上安裝.
- 按下一步按鈕.
- 在加入客戶體驗改善計劃 (CEIP) 屏幕上回答問題.
- 在下一個屏幕上,選擇 .NET Framework 4.5 軟件開發工具包功能.取消選擇所有其他可以取消選擇的功能.
- 選擇下載按鈕.
- 轉到下載位置(在步驟 2 中指定)并找到以下 .NET Framework 4.5 SDK 工具安裝程序文件:sdk_tools4.msi,sdk_tools4.cab
- 您可以將這些文件復制到組織內的 Windows Vista 或 Windows 2008 Server 計算機上.這些文件需要復制到 Windows Vista 或 Windows 2008 Server 計算機上的同一目錄中.注意:請勿在您的組織之外或作為任何其他安裝程序的一部分重新分發這些文件.
- 在 Windows Vista 或 Windows 2008 Server 計算機上,請在此處查看許可條款.
- 檢查計算機上是否已安裝 .NET Framework 4.5.否則,請從 www.microsoft.com 下載并安裝 .NET Framework 4.5.
- 以管理員權限打開命令提示符.
- 轉到復制 .NET Framework 4.5 SDK Tools 安裝程序文件的目錄.
- 使用命令行安裝 .NET Framework 4.5 SDK 工具:Msiexec/i sdk_tools4.msi VSEXTUI=1
這篇關于在構建服務器上構建沒有 Visual Studio 的 ASP.NET 4.5的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!