Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

169 lines (154 sloc) 6.806 kb
<?xml version="1.0" encoding="utf-8"?>
<Project
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
ToolsVersion="4.0"
DefaultTargets="Clean;Build;Publish">
<!-- Define build properties -->
<PropertyGroup>
<ManagementCmdletBinDirectory>.\WindowsAzurePowershell\src\Management\bin</ManagementCmdletBinDirectory>
<ManagementTestDirectory>.\WindowsAzurePowershell\src\Management.Test\bin</ManagementTestDirectory>
<ManagementTestAssemblyName>Microsoft.WindowsAzure.Management.Test.dll</ManagementTestAssemblyName>
<CloudServiceCmdletBinDirectory>.\WindowsAzurePowershell\src\Management.CloudService\bin</CloudServiceCmdletBinDirectory>
<CloudServiceTestDirectory>.\WindowsAzurePowershell\src\Management.CloudService.Test\bin</CloudServiceTestDirectory>
<CloudServiceTestAssemblyName>Microsoft.WindowsAzure.Management.CloudService.Test.dll</CloudServiceTestAssemblyName>
<TestMetadata>.\WindowsAzurePowershell\src\WindowsAzurePowershell.vsmdi</TestMetadata>
<TestSettings>.\WindowsAzurePowershell\src\Local.testsettings</TestSettings>
<SetupDirectory>.\WindowsAzurePowershell\setup\build</SetupDirectory>
<PublishDirectory>.\Publish</PublishDirectory>
<BuildOutputDirectory>$(PublishDirectory)\Build</BuildOutputDirectory>
<SetupOutputDirectory>$(PublishDirectory)\Setup</SetupOutputDirectory>
<TestFilter>!Functional</TestFilter>
<TestOutputDirectory>$(PublishDirectory)\TestResults</TestOutputDirectory>
</PropertyGroup>
<ItemGroup>
<CmdletSln Include=".\WindowsAzurePowershell\src\WindowsAzurePowershell.sln" />
<SetupSln Include=".\WindowsAzurePowershell\setup\azurepowershell.sln" />
</ItemGroup>
<!-- Clean the build in all configurations -->
<Target Name="Clean">
<!-- Clean the solutions -->
<Message Importance="high" Text="Cleaning Cmdlets..." ContinueOnError="true" />
<MSBuild
Projects="@(CmdletSln)"
Targets="Clean"
Properties="Configuration=Debug"
ContinueOnError="true" />
<MSBuild
Projects="@(CmdletSln)"
Targets="Clean"
Properties="Configuration=Release"
ContinueOnError="true" />
<MSBuild
Projects="@(CmdletSln)"
Targets="Clean"
Properties="Configuration=ReleaseSigned"
ContinueOnError="true" />
<MSBuild
Projects="@(SetupSln)"
Targets="Clean"
Properties="Configuration=Release"
ContinueOnError="true" />
<!-- Delete the publish files -->
<Message Importance="high" Text="Cleaning publish files..." ContinueOnError="true" />
<ItemGroup>
<PublishFiles Include="$(PublishDirectory)\**\*.*" />
</ItemGroup>
<Delete
Files="@(PublishFiles)"
ContinueOnError="true" />
<RemoveDir
Directories="$(PublishDirectory)"
ContinueOnError="true" />
</Target>
<!-- Build all flavors of the Cmdlets -->
<Target Name="BuildCmdlets">
<Message Importance="high" Text="Building Cmdlets..." />
<MSBuild
Projects="@(CmdletSln)"
Targets="Build"
Properties="Configuration=Debug"
ContinueOnError="true" />
<MSBuild
Projects="@(CmdletSln)"
Targets="Build"
Properties="Configuration=Release"
ContinueOnError="true" />
<MSBuild
Projects="@(CmdletSln)"
Targets="Build"
Properties="Configuration=ReleaseSigned"
ContinueOnError="true" />
</Target>
<!-- Build the Setup -->
<Target Name="BuildSetup">
<Message
Importance="high"
Text="Building Setup..."
ContinueOnError="true" />
<Message
Importance="high"
Text="You are required to have installed the WiX Toolset at http://wix.codeplex.com/releases/view/60102 (Wix35.msi)"
ContinueOnError="true" />
<MSBuild
Projects="@(SetupSln)"
Targets="Build"
Properties="Configuration=Release"
ContinueOnError="true" />
</Target>
<!-- Build the Cmdlets and Setup in all configurations -->
<Target
Name="Build"
DependsOnTargets="BuildCmdlets;BuildSetup" />
<!-- Publish any build artificates to the Publish directory -->
<Target Name="Publish" DependsOnTargets="Build">
<!-- Copy code artifacts -->
<Message Importance="high" Text="Publishing Cmdlets..." ContinueOnError="true" />
<ItemGroup>
<DebugFiles Include="$(CloudServiceCmdletBinDirectory)\Debug\**\*.*" />
<DebugFiles Include="$(ManagementCmdletBinDirectory)\Debug\**\*.*" />
<ReleaseFiles Include="$(CloudServiceCmdletBinDirectory)\Release\**\*.*" />
<ReleaseFiles Include="$(ManagementCmdletBinDirectory)\Release\**\*.*" />
</ItemGroup>
<MakeDir
Directories="$(BuildOutputDirectory)"
ContinueOnError="true" />
<Copy
SourceFiles="@(DebugFiles)"
DestinationFiles="@(DebugFiles->'$(BuildOutputDirectory)\Debug\%(RecursiveDir)%(Filename)%(Extension)')"
SkipUnchangedFiles="true"
ContinueOnError="true" />
<Copy
SourceFiles="@(ReleaseFiles)"
DestinationFiles="@(ReleaseFiles->'$(BuildOutputDirectory)\Release\%(RecursiveDir)%(Filename)%(Extension)')"
SkipUnchangedFiles="true"
ContinueOnError="true" />
<!-- Copy the Setup artifacts -->
<Message Importance="high" Text="Publishing Setup..." ContinueOnError="true" />
<ItemGroup>
<SetupFiles Include="$(SetupDirectory)\**\*.*" />
</ItemGroup>
<Copy
SourceFiles="@(SetupFiles)"
DestinationFiles="@(SetupFiles->'$(PublishDirectory)\Setup\%(RecursiveDir)%(Filename)%(Extension)')"
SkipUnchangedFiles="true"
ContinueOnError="true" />
</Target>
<!-- Run the unit tests -->
<Target Name="Test" DependsOnTargets="BuildCmdlets">
<Message Importance="high" Text="Running tests..." />
<Message Importance="high" Text="You are required to have installed the a version of Visual Studio with support for MSTest (and MSTest on your path)." />
<MakeDir Directories="$(TestOutputDirectory)" ContinueOnError="true" />
<Message Importance="high" Text="Debug tests:" />
<Exec
Command="MSTest.exe /testmetadata:$(TestMetadata) /testsettings:$(TestSettings) /category:$(TestFilter) /resultsfile:$(TestOutputDirectory)\Debug.trx"
ContinueOnError="true" />
<Message Importance="high" Text="Release tests:" />
<Exec
Command="MSTest.exe /testmetadata:$(TestMetadata) /testsettings:$(TestSettings) /category:$(TestFilter) /resultsfile:$(TestOutputDirectory)\Release.trx"
ContinueOnError="true" />
</Target>
<!-- Do everything possible -->
<Target
Name="Full"
DependsOnTargets="Clean;Build;Publish;Test" />
</Project>
Jump to Line
Something went wrong with that request. Please try again.