問(wèn)題描述
自從我設(shè)置構(gòu)建服務(wù)器以來(lái)已經(jīng)有一段時(shí)間了,所以也許我忘記了一些東西,或者 .NET 4.5 可能與我上次使用的任何版本不同,但這是我的問(wèn)題.
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.
我正在嘗試設(shè)置構(gòu)建服務(wù)器來(lái)監(jiān)控源代碼控制存儲(chǔ)庫(kù).每當(dāng)發(fā)生變化時(shí),我希望服務(wù)器拉取變化并構(gòu)建項(xiàng)目.如果沒(méi)有錯(cuò)誤,我想將站點(diǎn)部署到在構(gòu)建服務(wù)器上運(yùn)行的網(wǎng)站.
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.
過(guò)去,當(dāng)我這樣做時(shí),我認(rèn)為只安裝 .NET 就可以做到這一點(diǎn),但是當(dāng)我嘗試構(gòu)建這個(gè)項(xiàng)目時(shí),我收到一個(gè)錯(cuò)誤C:Program FilesMSBuildMicrosoftVisualStudiov11.0WebApplicationsMicrosoft.WebApplication.targets" 不見(jiàn)了,如果我去看看,我可以看到它不見(jiàn)了.事實(shí)上,沒(méi)有 Visual Studio 11 目標(biāo)文件.
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.
經(jīng)過(guò)深思熟慮和摸不著頭腦,我走出去得到了Windows 8/.NET 4.5 SDK",認(rèn)為 .NET 4.5 SDK 可能會(huì)安裝我需要的目標(biāo)文件,但除非我安裝了它才安裝莫名其妙地錯(cuò)了.
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.
那么,我需要在構(gòu)建服務(wù)器上放置什么才能構(gòu)建項(xiàng)目.我寧愿不必安裝完整的 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.
推薦答案
我的問(wèn)題與安裝有關(guān)Windows 2008 Box 上適用于 Windows 8 的 Windows 軟件開(kāi)發(fā)工具包 (SDK).如果您在該頁(yè)面上進(jìn)一步閱讀,您將看到標(biāo)有Windows Vista 和 Windows Server 2008 上的 .NET Framework 4.5 SDK 工具"的標(biāo)題.這告訴你:
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:
- 在受支持的操作系統(tǒng)(例如 Windows 7 或 Windows 8)上運(yùn)行 Windows SDK for Windows 8 安裝程序.
- 在指定位置"屏幕上選擇以下選項(xiàng):下載 Windows SDK 以在單獨(dú)的計(jì)算機(jī)上安裝.
- 按下一步按鈕.
- 在加入客戶體驗(yàn)改善計(jì)劃 (CEIP) 屏幕上回答問(wèn)題.
- 在下一個(gè)屏幕上,選擇 .NET Framework 4.5 軟件開(kāi)發(fā)工具包功能.取消選擇所有其他可以取消選擇的功能.
- 選擇下載按鈕.
- 轉(zhuǎn)到下載位置(在步驟 2 中指定)并找到以下 .NET Framework 4.5 SDK 工具安裝程序文件:sdk_tools4.msi,sdk_tools4.cab
- 您可以將這些文件復(fù)制到組織內(nèi)的 Windows Vista 或 Windows 2008 Server 計(jì)算機(jī)上.這些文件需要復(fù)制到 Windows Vista 或 Windows 2008 Server 計(jì)算機(jī)上的同一目錄中.注意:請(qǐng)勿在您的組織之外或作為任何其他安裝程序的一部分重新分發(fā)這些文件.
- 在 Windows Vista 或 Windows 2008 Server 計(jì)算機(jī)上,請(qǐng)?jiān)诖颂幉榭丛S可條款.
- 檢查計(jì)算機(jī)上是否已安裝 .NET Framework 4.5.否則,請(qǐng)從 www.microsoft.com 下載并安裝 .NET Framework 4.5.
- 以管理員權(quán)限打開(kāi)命令提示符.
- 轉(zhuǎn)到復(fù)制 .NET Framework 4.5 SDK Tools 安裝程序文件的目錄.
- 使用命令行安裝 .NET Framework 4.5 SDK 工具:Msiexec/i sdk_tools4.msi VSEXTUI=1
這篇關(guān)于在構(gòu)建服務(wù)器上構(gòu)建沒(méi)有 Visual Studio 的 ASP.NET 4.5的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!