summaryrefslogtreecommitdiffstats
path: root/nuget/nuget.proj
blob: d2ebfc1431e249de91d55f5af6058caad06668d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
	<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.props))\EnlistmentInfo.props" Condition=" '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.props))' != '' " />
	<Import Project="$(MSBuildProjectDirectory)\..\tools\DotNetOpenAuth.automated.props"/>

	<Target Name="BuildIntermediates">
		<ItemGroup>
			<ProductTargets Include="BuildUnifiedProduct;ResignShippingDelaySignedAssemblies" Condition=" '$(SkipNugetDependenciesBuild)' != 'true' " />
			<ProductTargets Include="GetOutputPath" />
			<AspNetTargets Include="Build;Sign" Condition=" '$(SkipNugetDependenciesBuild)' != 'true' " />
			<AspNetTargets Include="GetOutputPath" />
		</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=v4.5"
			BuildInParallel="$(BuildInParallel)">
			<Output TaskParameter="TargetOutputs" ItemName="TargetOutputs45"/>
		</MSBuild>
		<MSBuild
			Projects="$(ProjectRoot)src\DotNetOpenAuth.AspNet\DotNetOpenAuth.AspNet.csproj"
			Targets="@(AspNetTargets)"
			Properties="TargetFrameworkVersion=v4.5"
			BuildInParallel="$(BuildInParallel)">
		</MSBuild>
		<MSBuild
			Projects="$(ProjectRoot)src\DotNetOpenAuth.AspNet\DotNetOpenAuth.AspNet.csproj"
			Targets="@(AspNetTargets)"
			Properties="TargetFrameworkVersion=v4.5"
			BuildInParallel="$(BuildInParallel)">
		</MSBuild>

		<ItemGroup>
			<ResignedAssembliesOutputs Include="@(TargetOutputs45)" Condition=" '%(MSBuildSourceTargetName)' == 'Sign' ">
				<TargetFramework>v4.5</TargetFramework>
			</ResignedAssembliesOutputs>
		</ItemGroup>
		<PropertyGroup>
			<OutputPath45 Condition=" '%(MSBuildSourceTargetName)' == 'GetOutputPath' ">@(TargetOutputs45)</OutputPath45>
		</PropertyGroup>
	</Target>

	<Target Name="Build" DependsOnTargets="BuildIntermediates" Returns="@(NuGetPackages)">
		<ItemGroup>
			<NuGetProperties Include="version=$(NuGetPackageVersion)" />
			<NuGetProperties Include="oauth2version=$(NuGetPackageVersion)" />
			<NuGetProperties Include="OutputPath45=$(OutputPath45)" />
			<NuGetProperties Include="IntermediatePath=$(IntermediatePath45)" />
			<NuGetProperties Include="signedSubPath=$(SignedSubPath)" />

			<NuGetSpecifications Include="*.nuspec" Exclude="DotNetOpenAuth.nuspec">
				<Symbols>true</Symbols>
				<PackageVersion>$(NuGetPackageVersion)</PackageVersion>
			</NuGetSpecifications>
			<NuGetSpecifications Include="DotNetOpenAuth.nuspec">
				<PackageVersion>$(NuGetPackageVersion)</PackageVersion>
			</NuGetSpecifications>

			<NuGetPackages Include="@(NuGetSpecifications->'$(DropsRoot)%(FileName).%(PackageVersion).nupkg')" />
		</ItemGroup>
		<PropertyGroup>
			<_NuGetProperties>@(NuGetProperties)</_NuGetProperties>
		</PropertyGroup>
		<ItemGroup>
			<NuGetSpecifications>
				<Properties>$(_NuGetProperties);Identity=%(FileName);GeneratedAssemblyInfoSourceFile=$(IntermediatePath45)%(FileName).Version.cs</Properties>
			</NuGetSpecifications>
		</ItemGroup>

		<NuGetPack
			NuSpec="%(NuGetSpecifications.Identity)"
			OutputPackageDirectory="$(DropsRoot)"
			Properties="%(NuGetSpecifications.Properties)"
			Symbols="%(NuGetSpecifications.Symbols)"
			ToolPath="$(NuGetToolPath)" />
	</Target>

	<Import Project="$(ProjectRoot)tools\DotNetOpenAuth.automated.targets"/>
	<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.targets))\EnlistmentInfo.targets" Condition=" '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.targets))' != '' " />
</Project>