Skip to content

Commit

Permalink
Build .NET Standard 2.0 assembly.
Browse files Browse the repository at this point in the history
Remove seperate build script.
  • Loading branch information
drieseng committed Oct 30, 2017
1 parent e443594 commit 8156b62
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 30 deletions.
12 changes: 0 additions & 12 deletions build/build.cmd

This file was deleted.

34 changes: 19 additions & 15 deletions build/build.proj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="14.0" DefaultTargets="Clean;Build;Package" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask TaskName="Zip" AssemblyFile="$(MSBuildThisFileDirectory)target\nuget\packages\$(MSBuildTasksPackageId).$(MSBuildTasksPackageVersion)\tools\MSBuild.Community.Tasks.dll"/>
<PropertyGroup>
<Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
Expand All @@ -11,17 +11,18 @@
<ItemGroup>
<VisualStudioVersion Include="2012">
<SolutionFile>$(MSBuildThisFileDirectory)..\src\Renci.SshNet.VS2012.sln</SolutionFile>
<MSBuildToolsVersion>14.0</MSBuildToolsVersion>
<NuGetPackageRestore>true</NuGetPackageRestore>
<ToolsVersion>14.0</ToolsVersion>
<VisualStudioVersion>14.0</VisualStudioVersion>
</VisualStudioVersion>
<VisualStudioVersion Include="2015">
<SolutionFile>$(MSBuildThisFileDirectory)..\src\Renci.SshNet.VS2015.sln</SolutionFile>
<MSBuildToolsVersion>14.0</MSBuildToolsVersion>
<NuGetPackageRestore>true</NuGetPackageRestore>
<ToolsVersion>14.0</ToolsVersion>
<VisualStudioVersion>14.0</VisualStudioVersion>
</VisualStudioVersion>
<VisualStudioVersion Include="2017">
<SolutionFile>$(MSBuildThisFileDirectory)..\src\Renci.SshNet.VS2017.sln</SolutionFile>
<MSBuildToolsVersion>15.0</MSBuildToolsVersion>
<ToolsVersion>15.0</ToolsVersion>
<VisualStudioVersion>15.0</VisualStudioVersion>
</VisualStudioVersion>
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -62,15 +63,18 @@
<Moniker>uap10</Moniker>
</TargetFramework>
</ItemGroup>
<Target Name="Clean">
<Target Name="Clean" DependsOnTargets="CleanSolution">
<RemoveDir Directories="$(MSBuildThisFileDirectory)target"/>
</Target>
<Target Name="CleanSolution" Outputs="%(VisualStudioVersion.Identity)">

<ItemGroup>
<ProjectToBuild Remove="@(ProjectToBuild)"/>
<ProjectToBuild Include="%(VisualStudioVersion.SolutionFile)" Condition="'%(VisualStudioVersion.MSBuildToolsVersion)'=='$(MSBuildToolsVersion)'">
<Properties>Configuration=Release</Properties>
<ProjectToBuild Include="%(VisualStudioVersion.SolutionFile)">
<Properties>Configuration=Release;VisualStudioVersion=%(VisualStudioVersion.VisualStudioVersion)</Properties>
</ProjectToBuild>
</ItemGroup>
<MSBuild Projects="@(ProjectToBuild)" Targets="Clean" />
<MSBuild Projects="@(ProjectToBuild)" ToolsVersion="%(VisualStudioVersion.ToolsVersion)" Targets="Clean"/>
</Target>
<Target Name="DownloadNuGet">
<MakeDir Directories="$(MSBuildThisFileDirectory)target\nuget"/>
Expand All @@ -79,17 +83,17 @@
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" Condition="'%(VisualStudioVersion.MSBuildToolsVersion)'=='$(MSBuildToolsVersion)' and '%(VisualStudioVersion.NuGetPackageRestore)'=='true'"/>
<Exec Command="$(NuGetExe) restore &quot;%(VisualStudioVersion.SolutionFile)&quot;" Condition="'%(VisualStudioVersion.MSBuildToolsVersion)'=='$(MSBuildToolsVersion)' and '%(VisualStudioVersion.NuGetPackageRestore)'=='true'"/>
<Message Text="Restoring nuget packages for '%(VisualStudioVersion.SolutionFile)'..." Importance="High"/>
<Exec Command="$(NuGetExe) restore &quot;%(VisualStudioVersion.SolutionFile)&quot;"/>
</Target>
<Target Name="Build" DependsOnTargets="RestoreNuGetPackages" Outputs="%(VisualStudioVersion.Identity)">
<ItemGroup>
<ProjectToBuild Remove="@(ProjectToBuild)"/>
<ProjectToBuild Include="%(VisualStudioVersion.SolutionFile)" Condition="'%(VisualStudioVersion.MSBuildToolsVersion)'=='$(MSBuildToolsVersion)'">
<Properties>Configuration=Release</Properties>
<ProjectToBuild Include="%(VisualStudioVersion.SolutionFile)">
<Properties>Configuration=Release;VisualStudioVersion=%(VisualStudioVersion.VisualStudioVersion)</Properties>
</ProjectToBuild>
</ItemGroup>
<MSBuild Projects="@(ProjectToBuild)" Targets="Rebuild"/>
<MSBuild Projects="@(ProjectToBuild)" ToolsVersion="%(VisualStudioVersion.ToolsVersion)" Targets="Rebuild"/>
</Target>
<Target Name="Package" DependsOnTargets="CreateNuGetPackage;CreateBinPackage;GenerateHelpFile"/>
<Target Name="CreateNuGetPackage" DependsOnTargets="CopyBuildOutputToPackage">
Expand Down
1 change: 0 additions & 1 deletion src/Renci.SshNet.VS2012.sln
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Renci.SshNet.WindowsPhone8"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{2D6CAE62-D053-476F-9BDD-2B1F27FA9C5D}"
ProjectSection(SolutionItems) = preProject
..\build\build.cmd = ..\build\build.cmd
..\build\build.proj = ..\build\build.proj
EndProjectSection
EndProject
Expand Down
3 changes: 1 addition & 2 deletions src/Renci.SshNet.VS2015.sln
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25123.0
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{2D6CAE62-D053-476F-9BDD-2B1F27FA9C5D}"
ProjectSection(SolutionItems) = preProject
..\build\build.cmd = ..\build\build.cmd
..\build\build.proj = ..\build\build.proj
EndProjectSection
EndProject
Expand Down

0 comments on commit 8156b62

Please sign in to comment.