diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2011-09-02 21:17:56 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2011-09-02 21:17:56 -0700 |
commit | a4384806fbc19e6916cb5effd942ccb4fc790e5d (patch) | |
tree | 1adb021b752e7e29e37c3ecc7976adae9edbfe2f /src | |
parent | 4513da785ab63336f6e673cee472c68415d421c1 (diff) | |
download | DotNetOpenAuth-a4384806fbc19e6916cb5effd942ccb4fc790e5d.zip DotNetOpenAuth-a4384806fbc19e6916cb5effd942ccb4fc790e5d.tar.gz DotNetOpenAuth-a4384806fbc19e6916cb5effd942ccb4fc790e5d.tar.bz2 |
Fixed up signing and merging of the contracts assemblies.
Diffstat (limited to 'src')
-rw-r--r-- | src/DotNetOpenAuth/DotNetOpenAuth.proj | 45 |
1 files changed, 40 insertions, 5 deletions
diff --git a/src/DotNetOpenAuth/DotNetOpenAuth.proj b/src/DotNetOpenAuth/DotNetOpenAuth.proj index 4dddbf4..61aa259 100644 --- a/src/DotNetOpenAuth/DotNetOpenAuth.proj +++ b/src/DotNetOpenAuth/DotNetOpenAuth.proj @@ -2,30 +2,63 @@ <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0" DefaultTargets="BuildUnifiedProduct"> <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.props))\EnlistmentInfo.props" Condition=" '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.props))' != '' " /> + <PropertyGroup> + <SuppressBuildTarget>true</SuppressBuildTarget> + <AddContractsAssemblyForDelaySigning>false</AddContractsAssemblyForDelaySigning> + </PropertyGroup> + <Import Project="$(ProjectRoot)tools\DotNetOpenAuth.props" /> <Import Project="$(ProjectRoot)tools\DotNetOpenAuth.Product.props" /> <UsingTask AssemblyFile="$(ProjectRoot)lib\MSBuild.Community.Tasks.dll" TaskName="ILMerge"/> + <PropertyGroup> + <TargetPath>$(ILMergeOutputAssembly)</TargetPath> + </PropertyGroup> + <ItemGroup> <ProjectReference Include="@(ProductProjects)"> <PrimaryProductOutput>true</PrimaryProductOutput> </ProjectReference> + <SignDependsOn Include="BuildUnifiedProduct" /> + <DelaySignedAssemblies Include="$(ILMergeOutputContractAssembly)" /> </ItemGroup> <Target Name="BuildILMergeInputs" DependsOnTargets="ResolveReferences"> + <PropertyGroup> + <!-- The ILMerge task doesn't properly quote the path. --> + <ILMergeTargetPlatformDirectory Condition=" '$(ClrVersion)' == '4' ">"$(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0"</ILMergeTargetPlatformDirectory> + </PropertyGroup> + <ItemGroup> <ILMergeInputAssemblies Include="@(ReferencePath)" Condition=" '%(ReferencePath.PrimaryProductOutput)' == 'true' "/> + <ILMergeInputContractAssemblies Include="@(ILMergeInputAssemblies->'%(RootDir)%(Directory)CodeContracts\%(FileName).Contracts%(Extension)')" + Condition=" '%(FileName)' != 'Microsoft.Contracts' "/> </ItemGroup> </Target> - <Target Name="BuildUnifiedProduct" DependsOnTargets="BuildILMergeInputs" Inputs="@(ILMergeInputAssemblies)" Outputs="$(ILMergeOutputAssembly)"> - <PropertyGroup> - <!-- The ILMerge task doesn't properly quote the path. --> - <ILMergeTargetPlatformDirectory Condition=" '$(ClrVersion)' == '4' ">"$(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0"</ILMergeTargetPlatformDirectory> - </PropertyGroup> + <Target Name="BuildUnifiedContractAssembly" DependsOnTargets="BuildILMergeInputs" + Inputs="@(ILMergeInputContractAssemblies)" Outputs="$(ILMergeOutputContractAssembly)"> + + <MakeDir Directories="$(ILMergeOutputContractAssemblyDirectory)" /> + + <ILMerge + ExcludeFile="$(ProjectRoot)ILMergeInternalizeExceptions.txt" + InputAssemblies="@(ILMergeInputContractAssemblies)" + OutputFile="$(ILMergeOutputContractAssembly)" + SearchDirectories="$(OutputPath)" + KeyFile="$(PublicKeyFile)" + DelaySign="true" + ToolPath="$(ProjectRoot)tools\ILMerge" + TargetPlatformVersion="$(ClrVersion).0" + TargetPlatformDirectory="$(ILMergeTargetPlatformDirectory)" /> + </Target> + + <Target Name="BuildUnifiedProductAssembly" DependsOnTargets="BuildILMergeInputs" + Inputs="@(ILMergeInputAssemblies)" Outputs="$(ILMergeOutputAssembly)"> <MakeDir Directories="$(ILMergeOutputAssemblyDirectory)" /> + <ILMerge ExcludeFile="$(ProjectRoot)ILMergeInternalizeExceptions.txt" InputAssemblies="@(ILMergeInputAssemblies)" @@ -37,6 +70,8 @@ TargetPlatformDirectory="$(ILMergeTargetPlatformDirectory)" /> </Target> + <Target Name="BuildUnifiedProduct" DependsOnTargets="BuildUnifiedProductAssembly;BuildUnifiedContractAssembly" /> + <Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" /> <Import Project="$(ProjectRoot)tools\DotNetOpenAuth.targets" /> <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.targets))\EnlistmentInfo.targets" Condition=" '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.targets))' != '' " /> |