Permalink
Browse files

WP7 & Silverlight build using local SDKs for CI

  • Loading branch information...
1 parent e789629 commit 864e09982ff5bce49c8a57763b73ab00b6c35a1b @DamianEdwards DamianEdwards committed with DamianEdwards Sep 15, 2012
View
5 .nuget/NuGet.targets
@@ -47,7 +47,8 @@
<!-- Commands -->
<RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" -o "$(PackagesDir)"</RestoreCommand>
- <BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -p Configuration=$(Configuration) -o "$(PackageOutputDir)" -symbols</BuildCommand>
+
+ <BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -p "Configuration=$(Configuration);LocalToolsPath=$(LocalToolsPath)" -o "$(PackageOutputDir)" -symbols</BuildCommand>
<!-- Make the build depend on restore packages -->
<BuildDependsOn Condition="$(RestorePackages) == 'true'">
@@ -79,6 +80,8 @@
</Target>
<Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites">
+ <Message Importance="high" Text="NuGet.targets: LocalToolsPath = $(LocalToolsPath)" />
+
<Exec Command="$(BuildCommand)"
Condition=" '$(OS)' != 'Windows_NT' " />
View
24 Build/Build.proj
@@ -18,6 +18,7 @@
<ZipExe>$(ToolsPath)7za920\7za.exe</ZipExe>
<ScriptTempPath>$(ProjectRoot)\SignalR\bin\Scripts</ScriptTempPath>
<PrereleaseTagWithSeparator Condition="$(PrereleaseTag) != ''">-$(PrereleaseTag)</PrereleaseTagWithSeparator>
+ <LocalToolsPath></LocalToolsPath>
</PropertyGroup>
<PropertyGroup>
@@ -84,6 +85,9 @@
<TestProjects Include="$(ProjectRoot)\SignalR.Tests\bin\$(Configuration)\SignalR.Tests.dll" />
</ItemGroup>
+ <Target Name="CI" DependsOnTargets="Build; RunTests; BuildPackages;">
+ </Target>
+
<Target Name="Go" DependsOnTargets="UpdateVersion; Build; RunTests;">
</Target>
@@ -109,12 +113,12 @@
<MSBuild Projects="$(ProjectRoot)\SignalR.WP7.sln"
Targets="Build"
- Condition="Exists('$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\') And Exists('$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\v4.0\Microsoft.Silverlight.WindowsPhone71.Overrides.targets')"
+ Condition="(Exists('$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\') And Exists('$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\v4.0\Microsoft.Silverlight.WindowsPhone71.Overrides.targets')) Or (Exists('$(LocalToolsPath)\WP7'))"
Properties="Configuration=$(Configuration)" />
<MSBuild Projects="$(ProjectRoot)\SignalR.Silverlight.sln"
Targets="Build"
- Condition="Exists('$(MSBuildExtensionsPath)\Microsoft\Silverlight\v4.0') And Exists('$(MSBuildExtensionsPath)\Microsoft\Silverlight\v5.0\Microsoft.Silverlight.CSharp.targets')"
+ Condition="(Exists('$(MSBuildExtensionsPath)\Microsoft\Silverlight\v4.0') And Exists('$(MSBuildExtensionsPath)\Microsoft\Silverlight\v5.0\Microsoft.Silverlight.CSharp.targets')) Or (Exists('$(LocalToolsPath)\Silverlight'))"
Properties="Configuration=$(Configuration)" />
<MSBuild Projects="$(ProjectRoot)\SignalR.WinRT.sln"
@@ -142,6 +146,8 @@
</Target>
<Target Name="BuildPackages" DependsOnTargets="CreateOutputDir">
+ <Message Importance="high" Text="Using build resources from local tools path $(LocalToolsPath)" />
+
<ItemGroup>
<JsPackage Include="$(ProjectRoot)\SignalR.Client.JS\Properties\SignalR.Js.nuspec" />
<MetaPackage Include="$(ProjectRoot)\SignalR\Properties\SignalR.All.nuspec" />
@@ -165,18 +171,18 @@
<!-- Only build WP7 and Silverlight projects if SDK's avaliable -->
<MSBuild Projects="$(ProjectRoot)\SignalR.Client.WP7\SignalR.Client.WP7.csproj"
Targets="Build"
- Condition="Exists('$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\') And Exists('$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\v4.0\Microsoft.Silverlight.WindowsPhone71.Overrides.targets')"
- Properties="BuildPackage=true;Version=$(PackageVersion);PackageOutputDir=$(ArtifactsDir);Configuration=$(Configuration)" />
+ Condition="(Exists('$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\') And Exists('$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\v4.0\Microsoft.Silverlight.WindowsPhone71.Overrides.targets')) Or (Exists('$(LocalToolsPath)\WP7'))"
+ Properties="BuildPackage=true;Version=$(PackageVersion);PackageOutputDir=$(ArtifactsDir);Configuration=$(Configuration);LocalToolsPath=$(LocalToolsPath);" />
<MSBuild Projects="$(ProjectRoot)\SignalR.Client.Silverlight\SignalR.Client.Silverlight.csproj"
Targets="Build"
- Condition="Exists('$(MSBuildExtensionsPath)\Microsoft\Silverlight\v4.0')"
- Properties="BuildPackage=true;Version=$(PackageVersion);PackageOutputDir=$(ArtifactsDir);Configuration=$(Configuration)" />
+ Condition="Exists('$(MSBuildExtensionsPath)\Microsoft\Silverlight\v4.0') Or Exists('$(LocalToolsPath)\Silverlight\v4.0')"
+ Properties="BuildPackage=true;Version=$(PackageVersion);PackageOutputDir=$(ArtifactsDir);Configuration=$(Configuration);LocalToolsPath=$(LocalToolsPath);" />
<MSBuild Projects="$(ProjectRoot)\SignalR.Client.Silverlight5\SignalR.Client.Silverlight5.csproj"
- Targets="Build"
- Condition="Exists('$(MSBuildExtensionsPath)\Microsoft\Silverlight\v5.0\Microsoft.Silverlight.CSharp.targets')"
- Properties="BuildPackage=true;Version=$(PackageVersion);PackageOutputDir=$(ArtifactsDir);Configuration=$(Configuration)" />
+ Targets="Build"
+ Condition="Exists('$(MSBuildExtensionsPath)\Microsoft\Silverlight\v5.0\Microsoft.Silverlight.CSharp.targets') Or Exists('$(LocalToolsPath)\Silverlight\v5.0')"
+ Properties="BuildPackage=true;Version=$(PackageVersion);PackageOutputDir=$(ArtifactsDir);Configuration=$(Configuration);LocalToolsPath=$(LocalToolsPath);" />
<RemoveDir Directories="$(ScriptTempPath)" />
<MakeDir Directories="$(ScriptTempPath)" />
View
8 SignalR.Client.Silverlight/SignalR.Client.Silverlight.csproj
@@ -196,7 +196,13 @@
</None>
</ItemGroup>
<ItemGroup />
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+
+ <Import Project="$(LocalToolsPath)\Silverlight\v4.0\SignalR.Silverlight.targets"
+ Condition="'$(LocalToolsPath)'!=''" />
+
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets"
+ Condition=" '$(LocalToolsPath)' == '' And Exists('$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets')" />
+
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" />
<ProjectExtensions>
<VisualStudio>
View
8 SignalR.Client.Silverlight5/SignalR.Client.Silverlight5.csproj
@@ -196,7 +196,13 @@
<SubType>Designer</SubType>
</None>
</ItemGroup>
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+
+ <Import Project="$(LocalToolsPath)\Silverlight\v5.0\SignalR.Silverlight.targets"
+ Condition="'$(LocalToolsPath)'!=''" />
+
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets"
+ Condition=" '$(LocalToolsPath)' == '' And Exists('$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets')" />
+
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
View
29 SignalR.Client.WP7/SignalR.Client.WP7.csproj
@@ -188,15 +188,32 @@
<SubType>Designer</SubType>
</None>
</ItemGroup>
- <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets" />
- <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.CSharp.targets" />
+
+ <PropertyGroup>
+ <MissingExternalDependenciesBlendDesignTimehack>false</MissingExternalDependenciesBlendDesignTimehack>
+ <MissingExternalDependenciesBlendDesignTimehack Condition="!Exists('$(SolutionDir)Build')">true</MissingExternalDependenciesBlendDesignTimehack>
+ <CompileTimeSolutionDir Condition="'$(MissingExternalDependenciesBlendDesignTimehack)'!='true'">$(SolutionDir)</CompileTimeSolutionDir>
+ <CompileTimeSolutionDir Condition="'$(MissingExternalDependenciesBlendDesignTimehack)'=='true'">$(SolutionDir)..\</CompileTimeSolutionDir>
+ </PropertyGroup>
+
+ <!--<Import Project="C:\tools\WP7\SignalR.WP7.targets" />-->
+
+ <Import Project="$(LocalToolsPath)\WP7\SignalR.WP7.targets"
+ Condition=" '$(LocalToolsPath)' != '' " />
+
+ <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets"
+ Condition=" '$(LocalToolsPath)' == '' And Exists('$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets')" />
+ <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.CSharp.targets"
+ Condition=" '$(LocalToolsPath)' == '' And Exists('$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.CSharp.targets')" />
+
<ProjectExtensions />
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
+ Other similar extension points exist, see Microsoft.Common.targets. -->
<Target Name="BeforeBuild">
+ <Message Importance="high" Text="Using build resources from local tools path $(LocalToolsPath)" />
</Target>
- <Target Name="AfterBuild">
- </Target>
- -->
+ <!--<Target Name="AfterBuild">
+ </Target>-->
+
</Project>
View
17 SignalR.Client.WP71/SignalR.Client.WP71.csproj
@@ -183,8 +183,21 @@
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
- <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets" />
- <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.CSharp.targets" />
+
+ <PropertyGroup>
+ <MissingExternalDependenciesBlendDesignTimehack>false</MissingExternalDependenciesBlendDesignTimehack>
+ <MissingExternalDependenciesBlendDesignTimehack Condition="!Exists('$(SolutionDir)Build')">true</MissingExternalDependenciesBlendDesignTimehack>
+ <CompileTimeSolutionDir Condition="'$(MissingExternalDependenciesBlendDesignTimehack)'!='true'">$(SolutionDir)</CompileTimeSolutionDir>
+ <CompileTimeSolutionDir Condition="'$(MissingExternalDependenciesBlendDesignTimehack)'=='true'">$(SolutionDir)..\</CompileTimeSolutionDir>
+ </PropertyGroup>
+ <Import Project="$(LocalToolsPath)\WP7\SignalR.WP71.targets"
+ Condition="'$(LocalToolsPath)'!=''" />
+
+ <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets"
+ Condition="'$(LocalToolsPath)'==''" />
+ <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.CSharp.targets"
+ Condition="'$(LocalToolsPath)'==''" />
+
<ProjectExtensions />
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
View
6 build-ci.cmd
@@ -0,0 +1,6 @@
+@echo Off
+set config=%1
+if "%config%" == "" (
+ set config=Release
+)
+%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild Build\Build.proj /t:CI /p:LocalToolsPath="C:\tools" /p:Configuration="%config%" /v:M /fl /flp:LogFile=msbuild.log;Verbosity=Normal /nr:false
View
17 samples/SignalR.Client.WP7.Sample/SignalR.Client.WP7.Sample.csproj
@@ -114,8 +114,21 @@
<Name>SignalR.Client.WP71</Name>
</ProjectReference>
</ItemGroup>
- <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets" />
- <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.CSharp.targets" />
+
+ <PropertyGroup>
+ <MissingExternalDependenciesBlendDesignTimehack>false</MissingExternalDependenciesBlendDesignTimehack>
+ <MissingExternalDependenciesBlendDesignTimehack Condition="!Exists('$(SolutionDir)Build')">true</MissingExternalDependenciesBlendDesignTimehack>
+ <CompileTimeSolutionDir Condition="'$(MissingExternalDependenciesBlendDesignTimehack)'!='true'">$(SolutionDir)</CompileTimeSolutionDir>
+ <CompileTimeSolutionDir Condition="'$(MissingExternalDependenciesBlendDesignTimehack)'=='true'">$(SolutionDir)..\</CompileTimeSolutionDir>
+ </PropertyGroup>
+ <Import Project="$(LocalToolsPath)\WP7\SignalR.WP7.targets"
+ Condition="'$(LocalToolsPath)'!=''" />
+
+ <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets"
+ Condition="'$(LocalToolsPath)'==''" />
+ <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.CSharp.targets"
+ Condition="'$(LocalToolsPath)'==''" />
+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">

0 comments on commit 864e099

Please sign in to comment.