Search code examples
asp.netmsbuildvisual-studio-2012asp.net-4.5build-server

Build ASP.NET 4.5 without Visual Studio on Build Server


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.

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 Files\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.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.

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.

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.


Solution

  • 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:

    1. Run the Windows SDK for Windows 8 installer on a supported operating system (for example, Windows 7, or Windows 8).
    2. Choose the following option on the Specify Location screen: Download the Windows SDK for installation on a separate computer.
    3. Press the Next button.
    4. Answer the questions on the Join the Customer Experience Improvement Program (CEIP) screen.
    5. On the next screen, choose the .NET Framework 4.5 Software Development Kit feature. Unselect all other features that can be unselected.
    6. Choose the Download button.
    7. Go to the download location (specified in step 2) and find the following .NET Framework 4.5 SDK tool installer files: sdk_tools4.msi, sdk_tools4.cab
    8. You can copy these files to a Windows Vista or Windows 2008 Server computer within your organization. These files need to be copied to same directory on the Windows Vista or Windows 2008 Server computer. Note: Do not redistribute these files outside your organization or as part of any other installer.
    9. On the Windows Vista or Windows 2008 Server computer, review the license terms here .
    10. Check whether .NET Framework 4.5 is already installed on the computer. Otherwise, download and install .NET Framework 4.5 from www.microsoft.com .
    11. Open a command prompt with administrator privileges.
    12. Go to the directory where .NET Framework 4.5 SDK Tools installer files were copied.
    13. Install .NET Framework 4.5 SDK tools by using the command line: Msiexec /i sdk_tools4.msi VSEXTUI=1