Skip to content

Commit

Permalink
Add CopyArtifacts target to Build.proj and add nuspecs to /nuspecs
Browse files Browse the repository at this point in the history
- Automatically pick up new projects in Build.proj
- Add a package-src directory to artifacts
- Group artifacts by target platform
- Publish nuspecs to artifacts
- Publish FxCop logs to artifacts
- Publish jquery.signalR.js and jquery.signalR.min.js to artifacts
- Build Asp.Net samples from Build.proj and publish to artifacts
- Publish artifacts grouped by project to artifacts/projects

This is meant to make signing and localization simpler

SignalR#1896 SignalR#1897
  • Loading branch information
halter73 committed May 10, 2013
1 parent 2f93ca4 commit 0ee029d
Show file tree
Hide file tree
Showing 22 changed files with 717 additions and 90 deletions.
250 changes: 175 additions & 75 deletions build/Build.proj

Large diffs are not rendered by default.

Binary file added build/Microsoft.Bcl.Build.Tasks.dll
Binary file not shown.
227 changes: 227 additions & 0 deletions build/Microsoft.Bcl.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
<!--
***********************************************************************************************
Microsoft.Bcl.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (C) Microsoft Corporation. All rights reserved.
***********************************************************************************************
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' != 'Silverlight'">
<!--
Workaround MSBuild issue that prevents System.Runtime 2.5 and System.Threading.Tasks 2.5 from
satisfying indirect dependencies on System.Runtime 1.5 and System.Threading.Tasks 1.5 respectively.
-->
<AutoUnifyAssemblyReferences>false</AutoUnifyAssemblyReferences>

<!-- MSBuild by default doesn't pass the Web.Config ResolveAssemblyReference, in which case, set it so that it sees binding redirects -->
<AppConfig Condition="'$(AppConfig)' == '' And '$(WebProjectOutputDir)' != '' And Exists('$(ProjectConfigFileName)')">$(ProjectConfigFileName)</AppConfig>
</PropertyGroup>

<!-- Workaround issue that incorrectly unifies references not in the current profile to the version in the superset of all profiles. -->
<Target Name="_BclBuildSetFullFrameworkFolderToProfile" AfterTargets="GetReferenceAssemblyPaths" Condition="'$(TargetFrameworkIdentifier)' == '.NETPortable'">
<PropertyGroup>
<_FullFrameworkReferenceAssemblyPaths>$(TargetFrameworkDirectory)</_FullFrameworkReferenceAssemblyPaths>
</PropertyGroup>
</Target>

<!--
*******************************************************************************************************************
*******************************************************************************************************************
EnsureBindingRedirects Section
*******************************************************************************************************************
*******************************************************************************************************************
-->
<PropertyGroup>
<__IntermediateAppConfig>$(IntermediateOutputPath)$(MSBuildProjectFile).App.config</__IntermediateAppConfig>
</PropertyGroup>

<UsingTask TaskName="EnsureBindingRedirects" AssemblyFile="$(MSBuildThisFileDirectory)Microsoft.Bcl.Build.Tasks.dll" />

<!--
===================================================================================================================
BclBuildDetermineReferencesToRedirect
Determine which references are opted in for binding redirects
===================================================================================================================
-->
<Target Name="BclBuildDetermineReferencesToRedirect" BeforeTargets="BclBuildEnsureBindingRedirects">
<!-- Convention is a file next to the reference with name "ensureRedirect.xml" -->
<ItemGroup>
<_EnsureBindingRedirectReference Include="@(Reference)"
Condition="'%(Reference.HintPath)' != '' and Exists('$([System.IO.Path]::GetDirectoryName(&quot;%(Reference.HintPath)&quot;))\\ensureRedirect.xml')" />
</ItemGroup>
</Target>

<!--
===================================================================================================================
BclBuildEnsureBindingRedirects
Generate a new app.config with merged binding redirects if we have binding redirects to ensure and it's out of date
===================================================================================================================
-->
<Target Name="BclBuildEnsureBindingRedirects"
DependsOnTargets="BclBuildDetermineReferencesToRedirect"
BeforeTargets="ResolveAssemblyReferences"
Condition="'@(_EnsureBindingRedirectReference)' != ''"
Inputs="$(MSBuildAllProjects);$(AppConfig);@(_EnsureBindingRedirectReference->'%(HintPath)')"
Outputs="$(__IntermediateAppConfig)">

<EnsureBindingRedirects References="@(_EnsureBindingRedirectReference->'%(HintPath)')"
SourceAppConfigPath="$(AppConfig)"
DestinationAppConfigPath="$(__IntermediateAppConfig)">
<Output TaskParameter="DestinationAppConfigPath" ItemName="FileWrites"/>
</EnsureBindingRedirects>
</Target>

<!--
===================================================================================================================
BclBuildUpdateAppConfigWithTargetPath
Update project properties to point to the generated app.config
===================================================================================================================
-->
<Target Name="BclBuildUpdateAppConfigWithTargetPath"
DependsOnTargets="BclBuildDetermineReferencesToRedirect;BclBuildEnsureBindingRedirects"
BeforeTargets="ResolveAssemblyReferences"
Condition="'@(_EnsureBindingRedirectReference)' != ''">
<PropertyGroup>
<AppConfig>$(__IntermediateAppConfig)</AppConfig>
</PropertyGroup>
<ItemGroup>
<AppConfigWithTargetPath Remove="@(AppConfigWithTargetPath)" />
<AppConfigWithTargetPath Include="$(AppConfig)">
<TargetPath>$(TargetFileName).config</TargetPath>
</AppConfigWithTargetPath>
</ItemGroup>
</Target>


<!--
*******************************************************************************************************************
*******************************************************************************************************************
ValidatePackageReferences Section
This group of targets enables validation of nuget package references when building inside VisualStudio.
*******************************************************************************************************************
*******************************************************************************************************************
-->

<!--
===================================================================================================================
BclBuildAddProjectReferenceProperties
Adds properties to be set when resolving project references. The properties ensure that the references get built
in the context of the referencer (by changing the set of properties used to build the project) and pass down the
context needed to validate the referencing project.
===================================================================================================================
-->
<Target Name="BclBuildAddProjectReferenceProperties"
BeforeTargets="AssignProjectConfiguration"
Condition="'$(BuildingInsideVisualStudio)' == 'true'">
<PropertyGroup>
<_BclBuildProjectReferenceProperties>BclBuildReferencingProject=$(MSBuildProjectFullPath);BclBuildReferencingProjectConfig=$(MSBuildProjectDirectory)\packages.config</_BclBuildProjectReferenceProperties>
<_BclBuildProjectReferenceProperties Condition="'$(SkipValidatePackageReferences)' != ''">$(_BclBuildProjectReferenceProperties);SkipValidatePackageReferences=$(SkipValidatePackageReferences)</_BclBuildProjectReferenceProperties>
</PropertyGroup>

<ItemGroup>
<ProjectReference>
<Properties>%(ProjectReference.Properties);$(_BclBuildProjectReferenceProperties)</Properties>
</ProjectReference>
</ItemGroup>
</Target>

<!--
===================================================================================================================
BclBuildSetRunningFullBuild
Determines when a full build is running as opposed to a single target.
===================================================================================================================
-->
<Target Name="BclBuildSetRunningFullBuild"
BeforeTargets="BuildOnlySettings">
<PropertyGroup>
<BclBuildRunningFullBuild>true</BclBuildRunningFullBuild>
</PropertyGroup>
</Target>

<!--
===================================================================================================================
GetTargetPath/BclBuildGetTargetPath
MSBuild will only build a target once for a given set of properties.
We need that single build of GetTargetPath to run during project reference resolution, so that we can detect a
referencing project that doesn't have Bcl.Build.
To accomplish this we replace GetTargetPath with BclBuildGetTargetPath when running a full build.
===================================================================================================================
-->
<Target
Name="GetTargetPath"
Condition="'$(BclBuildRunningFullBuild)' != 'true'"
DependsOnTargets="$(GetTargetPathDependsOn)"
Returns="$(TargetPath)"/>

<Target
Name="BclBuildGetTargetPath"
Condition="'$(BclBuildRunningFullBuild)' == 'true'"
AfterTargets="GetTargetPath"
Returns="$(TargetPath)">
<PropertyGroup>
<!-- Reset BclBuildRunningFullBuild, it will be set again when doing a full build. -->
<BclBuildRunningFullBuild>false</BclBuildRunningFullBuild>
</PropertyGroup>
</Target>

<!--
===================================================================================================================
BclBuildValidateNugetPackageReferences
This target validates that any Nuget packages installed in the current project are also installed in projects
referencing the current project.
This is necessary because Nuget packages contain more than just simple references. Installing the package ensures
1. The right set of references for the target framework are added
2. Config file transforms are applied
3. Project installation scripts are run
For all packages listed as installed for the current project in packages config, if the package ID matches one
specified in @(ValidatePackages), ensure that the same package is installed in the referencing project.
This target can be disabled for a project reference by setting SkipValidatePackageReferences=true for the reference:
<ProjectReference Include="..\pcl\pcl.csproj">
<Project>{664a9e98-fac7-4567-a046-0dde95fddb48}</Project>
<Name>pcl</Name>
<Properties>SkipValidatePackageReferences=true</Properties>
</ProjectReference>
This target can be disabled for all references to a project by adding the following:
<PropertyGroup>
<SkipValidatePackageReferences>true</SkipValidatePackageReferences>
</PropertyGroup>
===================================================================================================================
-->
<UsingTask TaskName="ValidatePackageReferences" AssemblyFile="$(MSBuildThisFileDirectory)Microsoft.Bcl.Build.Tasks.dll" />
<Target Name="BclBuildValidateNugetPackageReferences"
Condition="'$(BclBuildRunningFullBuild)' != 'true' AND '$(SkipValidatePackageReferences)' != 'true' AND '$(BuildingInsideVisualStudio)' == 'true'"
BeforeTargets="GetTargetPath">
<ItemGroup>
<ValidatePackages Include="Microsoft.Bcl"/>
<ValidatePackages Include="Microsoft.Bcl.Async"/>
<ValidatePackages Include="Microsoft.Bcl.Compression"/>
<ValidatePackages Include="Microsoft.Net.Http"/>
</ItemGroup>

<ValidatePackageReferences Packages="@(ValidatePackages)"
ReferencingProject="$(BclBuildReferencingProject)"
ReferencingProjectPackagesConfig="$(BclBuildReferencingProjectConfig)"
ReferencedProject="$(MSBuildProjectFullPath)"
ReferencedProjectPackagesConfig="$(MSBuildProjectDirectory)\packages.config"
TreatWarningsAsErrors="$(TreatWarningsAsErrors)" />
</Target>
</Project>
31 changes: 31 additions & 0 deletions nuspecs/Microsoft.AspNet.SignalR.Client.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0"?>
<package>
<metadata>
<id>Microsoft.AspNet.SignalR.Client</id>
<title>Microsoft ASP.NET SignalR .NET Client</title>
<version>__SIGNALR_PACKAGE_VERSION__</version>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
<licenseUrl>http://www.microsoft.com/web/webpi/eula/signalr_prerelease.htm</licenseUrl>
<projectUrl>http://www.asp.net/signalr</projectUrl>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<description>.NET client for ASP.NET SignalR.</description>
<language>en-US</language>
<tags>Microsoft AspNet SignalR AspNetSignalR Client</tags>
<dependencies>
<dependency id="Newtonsoft.Json" version="4.5.11" />
</dependencies>
</metadata>
<files>
<file src="Net40\Microsoft.AspNet.SignalR.Client.dll" target="lib\net40" />
<file src="Intellisense\Net40\Microsoft.AspNet.SignalR.Client.xml" target="lib\net40" />
<file src="Net45\Microsoft.AspNet.SignalR.Client.dll" target="lib\net45" />
<file src="Intellisense\Net45\Microsoft.AspNet.SignalR.Client.xml" target="lib\net45" />
<file src="WinRT\Microsoft.AspNet.SignalR.Client.dll" target="lib\winrt" />
<file src="Intellisense\WinRT\Microsoft.AspNet.SignalR.Client.xml" target="lib\winrt" />
<file src="SL5\Microsoft.AspNet.SignalR.Client.dll" target="lib\sl5" />
<file src="Intellisense\SL5\Microsoft.AspNet.SignalR.Client.xml" target="lib\sl5" />
<file src="WP8\Microsoft.AspNet.SignalR.Client.dll" target="lib\wp8" />
<file src="Intellisense\WP8\Microsoft.AspNet.SignalR.Client.xml" target="lib\wp8" />
</files>
</package>
23 changes: 23 additions & 0 deletions nuspecs/Microsoft.AspNet.SignalR.Core.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0"?>
<package>
<metadata>
<id>Microsoft.AspNet.SignalR.Core</id>
<title>Microsoft ASP.NET SignalR Core Components</title>
<version>__SIGNALR_PACKAGE_VERSION__</version>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
<licenseUrl>http://www.microsoft.com/web/webpi/eula/signalr_prerelease.htm</licenseUrl>
<projectUrl>http://www.asp.net/signalr</projectUrl>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<description>Core server components for ASP.NET SignalR.</description>
<language>en-US</language>
<tags>Microsoft AspNet SignalR AspNetSignalR Core</tags>
<dependencies>
<dependency id="Newtonsoft.Json" version="4.5.11" />
</dependencies>
</metadata>
<files>
<file src="Net40\Microsoft.AspNet.SignalR.Core.dll" target="lib\net40" />
<file src="Intellisense\Net40\Microsoft.AspNet.SignalR.Core.xml" target="lib\net40" />
</files>
</package>
23 changes: 23 additions & 0 deletions nuspecs/Microsoft.AspNet.SignalR.JS.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0"?>
<package>
<metadata>
<id>Microsoft.AspNet.SignalR.JS</id>
<title>Microsoft ASP.NET SignalR JavaScript Client</title>
<version>__SIGNALR_PACKAGE_VERSION__</version>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
<licenseUrl>http://www.microsoft.com/web/webpi/eula/signalr_prerelease.htm</licenseUrl>
<projectUrl>http://www.asp.net/signalr</projectUrl>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<description>JavaScript client for ASP.NET SignalR.</description>
<language>en-US</language>
<tags>Microsoft AspNet SignalR AspNetSignalR JS</tags>
<dependencies>
<dependency id="jQuery" version="1.6.4" />
</dependencies>
</metadata>
<files>
<file src="Content\jquery.signalr-__SIGNALR_PACKAGE_VERSION__.js" target="content\Scripts" />
<file src="Content\jquery.signalr-__SIGNALR_PACKAGE_VERSION__.min.js" target="content\Scripts" />
</files>
</package>
26 changes: 26 additions & 0 deletions nuspecs/Microsoft.AspNet.SignalR.Owin.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0"?>
<package>
<metadata>
<id>Microsoft.AspNet.SignalR.Owin</id>
<title>Microsoft ASP.NET SignalR OWIN</title>
<version>__SIGNALR_PACKAGE_VERSION__</version>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
<licenseUrl>http://www.microsoft.com/web/webpi/eula/signalr_prerelease.htm</licenseUrl>
<projectUrl>http://www.asp.net/signalr</projectUrl>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<description>OWIN componenets for ASP.NET SignalR.</description>
<language>en-US</language>
<tags>Microsoft AspNet SignalR AspNetSignalR Owin</tags>
<dependencies>
<dependency id="Microsoft.AspNet.SignalR.Core" version="__SIGNALR_PACKAGE_VERSION__" />
<dependency id="Owin" version="1.0" />
</dependencies>
</metadata>
<files>
<file src="Net40\Microsoft.AspNet.SignalR.Owin.dll" target="lib\net40" />
<file src="Intellisense\Net40\Microsoft.AspNet.SignalR.Owin.xml" target="lib\net40" />
<file src="Net45\Microsoft.AspNet.SignalR.Owin.dll" target="lib\net45" />
<file src="Intellisense\Net45\Microsoft.AspNet.SignalR.Owin.xml" target="lib\net45" />
</files>
</package>
24 changes: 24 additions & 0 deletions nuspecs/Microsoft.AspNet.SignalR.Redis.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0"?>
<package>
<metadata>
<id>Microsoft.AspNet.SignalR.Redis</id>
<title>Microsoft ASP.NET SignalR Redis Messaging Backplane</title>
<version>__SIGNALR_REDIS_PACKAGE_VERSION__</version>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
<licenseUrl>http://www.microsoft.com/web/webpi/eula/signalr_prerelease.htm</licenseUrl>
<projectUrl>http://www.asp.net/signalr</projectUrl>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<description>Redis messaging backplane for scaling out of ASP.NET SignalR applications in a web-farm.</description>
<language>en-US</language>
<tags>Microsoft AspNet SignalR AspNetSignalR Redis</tags>
<dependencies>
<dependency id="Microsoft.AspNet.SignalR.Core" version="__SIGNALR_PACKAGE_VERSION__" />
<dependency id="BookSleeve" version="[1.2.0.2]" />
</dependencies>
</metadata>
<files>
<file src="Net40\Microsoft.AspNet.SignalR.Redis.dll" target="lib\net40" />
<file src="Intellisense\Net40\Microsoft.AspNet.SignalR.Redis.xml" target="lib\net40" />
</files>
</package>
Loading

0 comments on commit 0ee029d

Please sign in to comment.