diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2012-01-22 21:29:58 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2012-01-29 10:38:29 -0800 |
commit | d9176f02e7c3d2e6b00b7373a1496a689b15956d (patch) | |
tree | 6a6d8cdec8eb3e74f521a68a1c15d30db9706c61 /nuget/nuget.proj | |
parent | 3b698d3e7834b8508f11a25d6dd26c9b71d3e8cf (diff) | |
download | DotNetOpenAuth-d9176f02e7c3d2e6b00b7373a1496a689b15956d.zip DotNetOpenAuth-d9176f02e7c3d2e6b00b7373a1496a689b15956d.tar.gz DotNetOpenAuth-d9176f02e7c3d2e6b00b7373a1496a689b15956d.tar.bz2 |
NuGet packager now builds CLR 2 and 4 targeting assemblies and packages them together for automatic selection by NuGet.
Fixes #55
Diffstat (limited to 'nuget/nuget.proj')
-rw-r--r-- | nuget/nuget.proj | 43 |
1 files changed, 36 insertions, 7 deletions
diff --git a/nuget/nuget.proj b/nuget/nuget.proj index bf27b64..ceca8f0 100644 --- a/nuget/nuget.proj +++ b/nuget/nuget.proj @@ -3,7 +3,39 @@ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.props))\EnlistmentInfo.props" Condition=" '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.props))' != '' " /> <Import Project="$(MSBuildProjectDirectory)\..\tools\DotNetOpenAuth.automated.props"/> - <Target Name="Layout" DependsOnTargets="BuildUnifiedProduct;ReSignDelaySignedAssemblies"> + <Target Name="BuildIntermediates"> + <ItemGroup> + <ProductTargets Include="BuildUnifiedProduct;ReSignDelaySignedAssemblies" /> + </ItemGroup> + + <!-- We build the entire unified, signed product targeting both CLRs, since NuGet supports packages that contain both, + and by building against CLR 4, several assembly references fall away from dotnetopenauth.dll, which makes some folks happy. --> + <MSBuild + Projects="$(ProjectRoot)src\DotNetOpenAuth\DotNetOpenAuth.proj" + Targets="@(ProductTargets)" + Properties="TargetFrameworkVersion=v3.5" + BuildInParallel="$(BuildInParallel)"> + <Output TaskParameter="TargetOutputs" ItemName="ResignedAssembliesOutputs35"/> + </MSBuild> + <MSBuild + Projects="$(ProjectRoot)src\DotNetOpenAuth\DotNetOpenAuth.proj" + Targets="@(ProductTargets)" + Properties="TargetFrameworkVersion=v4.0" + BuildInParallel="$(BuildInParallel)"> + <Output TaskParameter="TargetOutputs" ItemName="ResignedAssembliesOutputs40"/> + </MSBuild> + + <ItemGroup> + <ResignedAssembliesOutputs Include="@(ResignedAssembliesOutputs35)" Condition=" '%(MSBuildSourceTargetName)' == 'Sign' "> + <TargetFramework>v3.5</TargetFramework> + </ResignedAssembliesOutputs> + <ResignedAssembliesOutputs Include="@(ResignedAssembliesOutputs40)" Condition=" '%(MSBuildSourceTargetName)' == 'Sign' "> + <TargetFramework>v4.0</TargetFramework> + </ResignedAssembliesOutputs> + </ItemGroup> + </Target> + + <Target Name="Layout" DependsOnTargets="BuildIntermediates"> <PropertyGroup> <NuGetLayoutPath>$(DropsRoot)NuGet\$(BuildVersion)\</NuGetLayoutPath> </PropertyGroup> @@ -14,12 +46,9 @@ <!-- IMPORTANT: These must appear as separate ItemGroups or else batching screws it up. --> <ItemGroup> - <NuGetSource Include="%(ResignedAssembliesOutputs.Identity)" Condition=" '%(FileName)%(Extension)' == 'DotNetOpenAuth.dll' "/> - <NuGetSource> - <TargetPath>$(NuGetLayoutPath)lib\net40-full\%(FileName)%(Extension)</TargetPath> - </NuGetSource> - <NuGetSource Condition=" '$(ClrVersion)' == '2' " Include="@(NuGetSource)"> - <TargetPath>$(NuGetLayoutPath)lib\full\%(FileName)%(Extension)</TargetPath> + <NuGetSource Include="%(ResignedAssembliesOutputs.Identity)" Condition=" '%(FileName)%(Extension)' == 'DotNetOpenAuth.dll' "> + <TargetPath Condition=" '%(TargetFramework)' == 'v4.0' ">$(NuGetLayoutPath)lib\net40-full\%(FileName)%(Extension)</TargetPath> + <TargetPath Condition=" '%(TargetFramework)' == 'v3.5' ">$(NuGetLayoutPath)lib\net35-full\%(FileName)%(Extension)</TargetPath> </NuGetSource> </ItemGroup> <ItemGroup> |