Recently our Visual Studio Team Services releases started to fail with the message
File not found: 'C:\Agent\_work\_tasks\AzureRmWebAppDeploy_497d490f-eea7-4f2b-ab94-48d9c1acdcb1\2.1.3\azurermwebappdeployment.js'
We changed nothing and the behaviour was pretty confusing. When checking the directory mentioned in the error message, the file was obviously not there but there was a zip archive “task”. This archive contained the script was well as some other folders.
Unzipping the archive in the folder did the trick and releases started working normally again. The correct folder should look like this:
Having a build server to compile all checked in code is a very useful thing but preparing the build server for SharePoint 2013 projects requires a few steps (applicable for TFS 2010 and TFS 2012). In order to complete it, you need to have a SharePoint development machine to copy the assemblies from.
- Run the SharePoint Prerequisites Installer in order to install all dependency (like Windows Identity Foundation etc.)
- Open the GAC on the development machine (C:\Windows\Microsoft.NET\assembly\GAC_MSIL\ ) and copy the following assemblies:
- Copy all SharePoint related assemblies from C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\ISAPI to C:\Program Files\Reference Assemblies\SharePoint\ on the build server
- Open the registry path HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.5.50709\AssemblyFoldersEx and add the following key: SharePoint15]@=”C:\Program Files\Reference Assemblies\SharePoint\”
- Copy the folders SharePointTools,Web, WebApplications from C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0 to the corresponding path on the build server
- Copy the file C:\Program Files\Common Files\Microsoft Shared\web server extensions\15\TEMPLATE\XML\appManifest.xsd to the corresponding path on the build server (only necessary if you want to build SharePoint 2013 Apps)
Hint: This tutorial assumes that the TFS binaries are installed and the build server is already connected to a TFS. The required steps are listed here: http://msdn.microsoft.com/en-us/library/hh395023.aspx