After cloning the repository AppVeyor runs MSBuild to build project sources and package artifacts.
The following command is used:
msbuild <project> /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
Custom logger is required to push MSBuild warning and errors in real-time to build console. You may use this logger in your own build scripts.
<project> is a Visual Studio project (
*.*proj) or solution (
*.sln) file. If project or solution file is not specified on project settings AppVeyor searches for the first occurence of
*.*proj file in the build clone directory recursively.
You may configure your own custom build script (“Script” mode) instead of calling MSBuild or disable build phase altogether.
Before running MSBuild AppVeyor analyzes the supplied project or solution file to determine the type and “flavor” of all projects.
To package Visual Studio WAP AppVeyor runs the following command:
msbuild <wap_project> /t:Package /p:PackageLocation=<web-deploy-package.zip>
If the project folder contains a
*.nuspec file AppVeyor will try to package the project as a NuGet library by calling the following command:
nuget pack <project_file> -OutputDirectory <temp_path>
For example, given the following project structure:
AppVeyor will call:
nuget pack SimpleConsole.Tests.csproj -OutputDirectory <temp_path>
To generate a
.nuspec file for your project use the
nuget spec command.
If Azure Cloud Service project (
.ccproj) is found with the solution AppVeyor will create Azure Cloud Service package (
.cspkg) using the following command:
msbuild <ccproj_file> /t:Publish /p:PublishDir=<temp_path>
Created Cloud Service package (
<project-name>.cspkg) and default “Cloud” configuration (
<project-name>.cscfg) will be published to build artifacts. In addition to that all
.cscfg files found in Cloud Service project folder are pushed to artifacts with names
By default, MSBuild uses
<project>.Cloud.cscfg cloud service configuration, but you can specify which configuration to use by adding a
TargetProfile environment variable, for example:
While trying to build an Azure Cloud Service project you may get the following (or similar related) error:
The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\vX.X\Windows Azure Tools\2.X\Microsoft.WindowsAzure.targets" was not found.
To fix this error add the following environment variable on the Environment tab of project settings:
where 12.0 is your version of Visual Studio (VS 2013 - 12.0, VS 2012 - 11.0, VS 2010 - 10.0).