빌드 서버에서 Visual Studio없이 ASP.NET 4.5 빌드
빌드 서버를 설정 한 지 오래되었으므로 뭔가 잊었거나 .NET 4.5가 지난번에 한 버전과 다를 수 있지만 여기에 내 문제가 있습니다.
소스 제어 저장소를 모니터링하기 위해 빌드 서버를 설정하려고합니다. 뭔가 변경 될 때마다 서버가 변경 사항을 가져 와서 프로젝트를 빌드하기를 원합니다. 오류가 없으면 빌드 서버에서 실행되는 웹 사이트에 사이트를 배포하고 싶습니다.
예전에는 .NET 만 설치해서 할 수 있다고 생각했지만이 프로젝트를 빌드하려고하면 "C : \ Program Files \ MSBuild \ Microsoft \ VisualStudio \ v11 .0 \ WebApplications \ Microsoft.WebApplication.targets "가 누락되었습니다. 가서 보면 누락 된 것을 알 수 있습니다. 실제로 Visual Studio 11 대상 파일이 없습니다.
많은 생각과 머리를 긁은 후 나가서 .NET 4.5 SDK가 필요한 대상 파일을 설치할 수 있다고 생각하는 "Windows 8 / .NET 4.5 SDK"를 얻었지만 어떻게 든 잘못 설치하지 않는 한 그렇지 않았습니다. .
따라서 프로젝트를 빌드하려면 빌드 서버에 무엇을 입력해야합니까? 전체 Visual Studio 2012를 설치할 필요가 없습니다.
내 문제는 Windows 2008 Box에 Windows 8 용 Windows SDK (소프트웨어 개발 키트) 를 설치하는 것과 관련이 있습니다. 이 페이지에서 더 자세히 읽으면 "Windows Vista 및 Windows Server 2008의 .NET Framework 4.5 SDK 도구"라는 제목이 표시됩니다. 이것은 다음을 알려줍니다.
- 지원되는 운영 체제 (예 : Windows 7 또는 Windows 8)에서 Windows 8 용 Windows SDK 설치 관리자를 실행합니다.
- 위치 지정 화면에서 다음 옵션을 선택합니다. 별도의 컴퓨터에 설치할 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 도구 설치 프로그램 파일이 복사 된 디렉터리로 이동합니다.
- 명령 줄을 사용하여 .NET Framework 4.5 SDK 도구를 설치합니다. Msiexec / i sdk_tools4.msi VSEXTUI = 1
Visual Studio없이 CI 서버에서 실행하려면 개발 컴퓨터에서 CI 서버의 동일한 위치로 몇 개의 폴더 만 복사하면됩니다. SDK를 설치할 필요가 없습니다.
VS 2015 :
- C : \ Program Files (x86) \ MSBuild \ Microsoft \ VisualStudio \ v14.0 \ Web
- C : \ Program Files (x86) \ MSBuild \ Microsoft \ VisualStudio \ v14.0 \ WebApplications
VS 2013 :
- C : \ Program Files (x86) \ MSBuild \ Microsoft \ VisualStudio \ v12.0 \ Web
- C : \ Program Files (x86) \ MSBuild \ Microsoft \ VisualStudio \ v12.0 \ WebApplications
VS 2012 :
- C : \ Program Files (x86) \ MSBuild \ Microsoft \ VisualStudio \ v11.0 \ Web
- C : \ Program Files (x86) \ MSBuild \ Microsoft \ VisualStudio \ v11.0 \ WebApplications
VS 2010 :
- C : \ Program Files (x86) \ MSBuild \ Microsoft \ VisualStudio \ v10.0 \ Web
- C : \ Program Files (x86) \ MSBuild \ Microsoft \ VisualStudio \ v10.0 \ WebApplications
.NET 4.6 :
- C : \ Program Files (x86) \ Reference Assemblies \ Microsoft \ Framework \ .NETFramework \ v4.6
.NET 4.5.2 :
- C : \ Program Files (x86) \ Reference Assemblies \ Microsoft \ Framework \ .NETFramework \ v4.5.2
.NET 4.5.1 :
- C : \ Program Files (x86) \ Reference Assemblies \ Microsoft \ Framework \ .NETFramework \ v4.5.1
.NET 4.5 :
- C : \ Program Files (x86) \ Reference Assemblies \ Microsoft \ Framework \ .NETFramework \ v4.5
.NET 4.0.1 :
- C : \ Program Files (x86) \ Reference Assemblies \ Microsoft \ Framework \ .NETFramework \ v4.0.1
.NET 4.0 :
- C : \ Program Files (x86) \ Reference Assemblies \ Microsoft \ Framework \ .NETFramework \ v4.0
또는 Matt가 제안한 대로 프로젝트의 하위 디렉터리에 복사하고 <MSBuildExtensionsPath32>
MSBuild (일반적으로 .csproj
또는 .vbproj
) 파일 의 위치를 변경할 수 있습니다.
Once you have done this, your project will compile.
You should also set the VisualStudioVersion environment variable explicitly to the Visual Studio version (10.0 for VS2010, 11.0 for VS2012, 12.0 for VS2013, 14.0 for VS2015) you are using just to be sure it is set right in your configuration.
From msdn:
The Windows SDK no longer ships with a complete command-line build environment. You must install a compiler and build environment separately. If you require a complete development environment that includes compilers and a build environment, you can download Visual Studio 2012 Express, which includes the appropriate components of the Windows SDK.
In order to fix this, I had to copy the folder C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5
from my development machine (which has Visual Studio 2012 by the way) onto the build agents. After this operation, Team City did not report any more errors and mscorlib.dll was not output to the bin folder.
Microsoft Build Tools 2013 will help in this case, as its download page describes:
If you don't have Visual Studio installed on your computer, you can use Build Tools 2013 to build managed applications. The Visual Basic and C# compilers are also included in this download. (In earlier versions, these tools were included in the stand-alone .NET Framework.)
My dept. likes taking a minimalistic approach to what's installed on our Win 7 build machines. However, we don't like just copying and pasting files/folders because of potential registry key issues. Instead of installing VS 2013, I installed the following much smaller and free components. Now the dev team can build VS 2013 web apps successfully.
- .Net Framework v4.5.1, required to install the tools - http://www.microsoft.com/en-us/download/details.aspx?id=40779
- MS Build Tools 2013, we needed the C# compiler - http://blogs.msdn.com/b/visualstudio/archive/2013/07/24/msbuild-is-now-part-of-visual-studio.aspx
- MS VS 2013 Isolated Shell, we needed the web app targets - http://www.microsoft.com/en-us/download/details.aspx?id=40764.
I solve this problem with Visual Studio Agents.
You can try install Visual Studio Agents 2012.
http://www.microsoft.com/en-us/download/details.aspx?id=38186
참고URL : https://stackoverflow.com/questions/12944502/build-asp-net-4-5-without-visual-studio-on-build-server
'Programing' 카테고리의 다른 글
LaTeX에서 두 그림을 같은 페이지에 유지하는 방법은 무엇입니까? (0) | 2020.10.05 |
---|---|
kayak.com과 같은 사이트는 어떻게 콘텐츠를 집계합니까? (0) | 2020.10.05 |
.NET 메모리 부족 예외-1.3GB를 사용했지만 16GB가 설치되어 있습니다. (0) | 2020.10.05 |
Java 객체를 XML 문자열로 변환 (0) | 2020.10.05 |
Java Webservice Client (최상의 방법) (0) | 2020.10.05 |