-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathbuild.proj
139 lines (132 loc) · 6.77 KB
/
build.proj
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Clean;Build;CreatePackage" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
<BuildRoot>$(MSBuildThisFileDirectory)</BuildRoot>
<NuGetExe>$(BuildRoot)target\nuget\nuget.exe</NuGetExe>
<MSBuildCommunityTasksPath>$(MSBuildThisFileDirectory)msbuild</MSBuildCommunityTasksPath>
</PropertyGroup>
<ItemGroup>
<VisualStudioVersion Include="2012">
<SolutionFile>$(MSBuildThisFileDirectory)..\src\SshNet.Security.Cryptography.VS2012.sln</SolutionFile>
<ToolsVersion>14.0</ToolsVersion>
<VisualStudioVersion>14.0</VisualStudioVersion>
</VisualStudioVersion>
<VisualStudioVersion Include="2015">
<SolutionFile>$(MSBuildThisFileDirectory)..\src\SshNet.Security.Cryptography.VS2015.sln</SolutionFile>
<ToolsVersion>14.0</ToolsVersion>
<VisualStudioVersion>14.0</VisualStudioVersion>
</VisualStudioVersion>
<VisualStudioVersion Include="2017">
<SolutionFile>$(MSBuildThisFileDirectory)..\src\SshNet.Security.Cryptography.VS2017.sln</SolutionFile>
<ToolsVersion>15.0</ToolsVersion>
<VisualStudioVersion>15.0</VisualStudioVersion>
</VisualStudioVersion>
</ItemGroup>
<ItemGroup>
<TargetFramework Include=".NET Framework 2.0">
<OutputDirectory>SshNet.Security.Cryptography.NET20\bin\$(Configuration)</OutputDirectory>
<Moniker>net20</Moniker>
</TargetFramework>
<TargetFramework Include=".NET Framework 4.0">
<OutputDirectory>SshNet.Security.Cryptography.NET40\bin\$(Configuration)</OutputDirectory>
<Moniker>net40</Moniker>
</TargetFramework>
<TargetFramework Include=".NET Framework 4.5">
<OutputDirectory>SshNet.Security.Cryptography.NET45\bin\$(Configuration)</OutputDirectory>
<Moniker>net45</Moniker>
</TargetFramework>
<TargetFramework Include="Silverlight 4">
<OutputDirectory>SshNet.Security.Cryptography.Silverlight4\bin\$(Configuration)</OutputDirectory>
<Moniker>sl4</Moniker>
</TargetFramework>
<TargetFramework Include="Silverlight 5">
<OutputDirectory>SshNet.Security.Cryptography.Silverlight5\bin\$(Configuration)</OutputDirectory>
<Moniker>sl5</Moniker>
</TargetFramework>
<TargetFramework Include="Universal Windows Platform 10">
<OutputDirectory>SshNet.Security.Cryptography.UAP10\bin\$(Configuration)</OutputDirectory>
<Moniker>uap10.0</Moniker>
</TargetFramework>
<TargetFramework Include="Windows Phone Silverlight 7.1">
<OutputDirectory>SshNet.Security.Cryptography.WindowsPhone71\bin\$(Configuration)</OutputDirectory>
<Moniker>wp71</Moniker>
</TargetFramework>
<TargetFramework Include="Windows Phone Silverlight 8.0">
<OutputDirectory>SshNet.Security.Cryptography.WindowsPhone80\bin\$(Configuration)</OutputDirectory>
<Moniker>wp8</Moniker>
</TargetFramework>
<TargetFramework Include="Windows 8 and Windows Phone 8.1">
<OutputDirectory>SshNet.Security.Cryptography.NET45+Win8+WPA81\bin\$(Configuration)</OutputDirectory>
<Moniker>portable-net45+win8+wpa81</Moniker>
</TargetFramework>
<TargetFramework Include=".NETStandard 1.0">
<OutputDirectory>SshNet.Security.Cryptography.NETStandard\bin\$(Configuration)\netstandard1.0</OutputDirectory>
<Moniker>netstandard1.0</Moniker>
</TargetFramework>
<TargetFramework Include=".NETStandard 1.3">
<OutputDirectory>SshNet.Security.Cryptography.NETStandard\bin\$(Configuration)\netstandard1.3</OutputDirectory>
<Moniker>netstandard1.3</Moniker>
</TargetFramework>
<TargetFramework Include=".NETStandard 2.0">
<OutputDirectory>SshNet.Security.Cryptography.NETStandard\bin\$(Configuration)\netstandard2.0</OutputDirectory>
<Moniker>netstandard2.0</Moniker>
</TargetFramework>
</ItemGroup>
<Target Name="Clean" DependsOnTargets="CleanSolution">
<RemoveDir Directories="$(MSBuildThisFileDirectory)target"/>
</Target>
<Target Name="CleanSolution" Outputs="%(VisualStudioVersion.Identity)">
<ItemGroup>
<ProjectToBuild Remove="@(ProjectToBuild)"/>
<ProjectToBuild Include="%(VisualStudioVersion.SolutionFile)">
<Properties>Configuration=Release;VisualStudioVersion=%(VisualStudioVersion.VisualStudioVersion)</Properties>
</ProjectToBuild>
</ItemGroup>
<MSBuild Projects="@(ProjectToBuild)" ToolsVersion="%(VisualStudioVersion.ToolsVersion)" Targets="Clean"/>
</Target>
<Target Name="DownloadNuGet">
<MakeDir Directories="$(MSBuildThisFileDirectory)target\nuget"/>
<DownloadFile
Address="https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
FileName="$(MSBuildThisFileDirectory)target\nuget\nuget.exe"/>
</Target>
<Target Name="RestoreNuGetPackages" DependsOnTargets="DownloadNuGet" Outputs="%(VisualStudioVersion.Identity)">
<Message Text="Restoring nuget packages for '%(VisualStudioVersion.SolutionFile)'..." Importance="High"/>
<Exec Command="$(MSBuildThisFileDirectory)target\nuget\nuget.exe restore "%(VisualStudioVersion.SolutionFile)""/>
</Target>
<Target Name="Build" DependsOnTargets="RestoreNuGetPackages" Outputs="%(VisualStudioVersion.Identity)">
<ItemGroup>
<ProjectToBuild Remove="@(ProjectToBuild)"/>
<ProjectToBuild Include="%(VisualStudioVersion.SolutionFile)">
<Properties>Configuration=Release;VisualStudioVersion=%(VisualStudioVersion.VisualStudioVersion)</Properties>
</ProjectToBuild>
</ItemGroup>
<MSBuild Projects="@(ProjectToBuild)" ToolsVersion="%(VisualStudioVersion.ToolsVersion)" Targets="Rebuild"/>
</Target>
<Target Name="CreatePackage" DependsOnTargets="CopyBuildOutputToPackage">
<Exec Command="$(NuGetExe) pack $(MSBuildThisFileDirectory)nuget\SshNet.Security.Cryptography.nuspec -OutputDirectory "$(MSBuildThisFileDirectory)target" -BasePath "$(MSBuildThisFileDirectory)target\package" -NonInteractive"/>
</Target>
<Target Name="CopyBuildOutputToPackage" Outputs="%(TargetFramework.Identity)">
<ItemGroup>
<BuildOutput Remove="@(BuildOutput)"/>
<BuildOutput Include="$(MSBuildThisFileDirectory)..\src\%(TargetFramework.OutputDirectory)\SshNet.Security.Cryptography.dll"/>
<BuildOutput Include="$(MSBuildThisFileDirectory)..\src\%(TargetFramework.OutputDirectory)\SshNet.Security.Cryptography.xml"/>
</ItemGroup>
<Copy SourceFiles="@(BuildOutput)" DestinationFolder="$(MSBuildThisFileDirectory)target\package\lib\%(TargetFramework.Moniker)"/>
</Target>
<UsingTask TaskName="DownloadFile" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<Address ParameterType="System.String" Required="true"/>
<FileName ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Reference Include="System" />
<Code Type="Fragment" Language="cs">
<![CDATA[
new System.Net.WebClient().DownloadFile(Address, FileName);
]]>
</Code>
</Task>
</UsingTask>
</Project>