summaryrefslogtreecommitdiffstats
path: root/samples/tools.proj
blob: 74f645754b6ffd048f58b4fb1914b297dd906bec (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
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
	<Import Project="$(MSBuildProjectDirectory)\..\tools\DotNetOpenAuth.automated.props"/>

	<Target Name="Layout">
		<PropertyGroup>
			<ToolsDirectoryNoSlash>$(DropsRoot)$(ProductName)-Tools-$(BuildVersion)</ToolsDirectoryNoSlash>
			<ToolsDirectory>$(ToolsDirectoryNoSlash)\</ToolsDirectory>
		</PropertyGroup>

		<ItemGroup>
			<ToolProjects Include="$(ProjectRoot)Samples\OpenIdOfflineProvider\OpenIdOfflineProvider.csproj">
				<Targets>Sign</Targets>
			</ToolProjects>
		</ItemGroup>

		<MSBuild Projects="@(ToolProjects)" Targets="%(ToolProjects.Targets)" BuildInParallel="$(BuildInParallel)">
			<Output TaskParameter="TargetOutputs" ItemName="OfflineProvider"/>
		</MSBuild>

		<ItemGroup>
			<!-- Remove the un-unified assembly. -->
			<OfflineProvider Remove="$(OutputPath)$(SignedSubPath)$(ProductName).dll" />
			<!-- add the PDBs -->
			<OfflineProvider Include="@(OfflineProvider->'%(SymbolPath)')" />
			<OfflineProviderTargets Include="
											 @(OfflineProvider->'$(ToolsDirectory)%(CultureDir)%(FileName)%(Extension)')"/>

			<AllToolSources Include="@(OfflineProvider)" />
			<AllToolTargets Include="@(OfflineProviderTargets)" />
		</ItemGroup>

		<MakeDir Directories="@(ToolsDirectory)" />
		<Copy SourceFiles="@(AllToolSources)" DestinationFiles="@(AllToolTargets)" SkipUnchangedFiles="true" />

		<!-- remove files that shouldn't be in the directory (perhaps from a previous version). -->
		<Purge Directories="$(ToolsDirectory)" IntendedFiles="@(AllToolTargets)" />
	</Target>

	<Target Name="Build" DependsOnTargets="Layout">
		<PropertyGroup>
			<ToolsZip>$(ToolsDirectoryNoSlash).zip</ToolsZip>
		</PropertyGroup>

		<Zip ZipFileName="$(ToolsZip)"
				 Files="@(AllToolTargets)"
				 WorkingDirectory="$(ToolsDirectory)"
				 ZipLevel="$(ZipLevel)" />
	</Target>

	<Import Project="$(ProjectRoot)tools\DotNetOpenAuth.automated.targets"/>
</Project>