Skip to content

Commit 89079bd

Browse files
Fix build scripts
1 parent 7126f92 commit 89079bd

File tree

4 files changed

+36
-146
lines changed

4 files changed

+36
-146
lines changed

build/build.proj

Lines changed: 18 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -8,86 +8,37 @@
88
<MSBuildTasksPackageId>MSBuildTasks</MSBuildTasksPackageId>
99
<MSBuildTasksPackageVersion>1.5.0.214</MSBuildTasksPackageVersion>
1010
</PropertyGroup>
11-
12-
<ItemGroup>
13-
<VisualStudioVersionClassic Include="2012">
14-
<SolutionFile>$(MSBuildThisFileDirectory)..\src\Renci.SshNet.VS2012.sln</SolutionFile>
15-
<ToolsVersion>14.0</ToolsVersion>
16-
<VisualStudioVersion>14.0</VisualStudioVersion>
17-
</VisualStudioVersionClassic>
18-
<VisualStudioVersionClassic Include="2015">
19-
<SolutionFile>$(MSBuildThisFileDirectory)..\src\Renci.SshNet.VS2015.sln</SolutionFile>
20-
<ToolsVersion>14.0</ToolsVersion>
21-
<VisualStudioVersion>14.0</VisualStudioVersion>
22-
</VisualStudioVersionClassic>
23-
</ItemGroup>
24-
25-
<ItemGroup>
26-
<VisualStudioVersionModern Include="2019">
27-
<SolutionFile>$(MSBuildThisFileDirectory)..\src\Renci.SshNet.VS2019.sln</SolutionFile>
28-
<VisualStudioVersion>16.0</VisualStudioVersion>
29-
</VisualStudioVersionModern>
30-
</ItemGroup>
3111

3212
<ItemGroup>
33-
<TargetFrameworkClassic Include="Windows Phone Silverlight 7.1">
34-
<OutputDirectory>Renci.SshNet.WindowsPhone\bin\$(Configuration)</OutputDirectory>
35-
<Moniker>wp71</Moniker>
36-
</TargetFrameworkClassic>
37-
<TargetFrameworkClassic Include="Windows Phone Silverlight 8.0">
38-
<OutputDirectory>Renci.SshNet.WindowsPhone8\bin\$(Configuration)</OutputDirectory>
39-
<Moniker>wp8</Moniker>
40-
</TargetFrameworkClassic>
41-
<TargetFrameworkClassic Include="Silverlight 4">
42-
<OutputDirectory>Renci.SshNet.Silverlight\bin\$(Configuration)</OutputDirectory>
43-
<Moniker>sl4</Moniker>
44-
</TargetFrameworkClassic>
45-
<TargetFrameworkClassic Include="Silverlight 5">
46-
<OutputDirectory>Renci.SshNet.Silverlight5\bin\$(Configuration)</OutputDirectory>
47-
<Moniker>sl5</Moniker>
48-
</TargetFrameworkClassic>
49-
<TargetFrameworkClassic Include="Universal Windows Platform 10">
50-
<OutputDirectory>Renci.SshNet.UAP10\bin\$(Configuration)</OutputDirectory>
51-
<Moniker>uap10</Moniker>
52-
</TargetFrameworkClassic>
13+
<VisualStudioVersionModern Include="2022">
14+
<SolutionFile>$(MSBuildThisFileDirectory)..\src\Renci.SshNet.sln</SolutionFile>
15+
<VisualStudioVersion>17.0</VisualStudioVersion>
16+
</VisualStudioVersionModern>
5317
</ItemGroup>
5418

5519
<ItemGroup>
56-
<TargetFrameworkModern Include=".NET Framework 3.5">
57-
<OutputDirectory>Renci.SshNet\bin\$(Configuration)\net35</OutputDirectory>
58-
<Moniker>net35</Moniker>
59-
</TargetFrameworkModern>
60-
<TargetFrameworkModern Include=".NET Framework 4.0">
61-
<OutputDirectory>Renci.SshNet\bin\$(Configuration)\net40</OutputDirectory>
62-
<Moniker>net40</Moniker>
63-
</TargetFrameworkModern>
64-
<TargetFrameworkModern Include=".NETStandard 1.3">
65-
<OutputDirectory>Renci.SshNet\bin\$(Configuration)\netstandard1.3</OutputDirectory>
66-
<Moniker>netstandard1.3</Moniker>
20+
<TargetFrameworkModern Include=".NET Framework 4.6.2">
21+
<OutputDirectory>Renci.SshNet\bin\$(Configuration)\net462</OutputDirectory>
22+
<Moniker>net462</Moniker>
6723
</TargetFrameworkModern>
6824
<TargetFrameworkModern Include=".NETStandard 2.0">
6925
<OutputDirectory>Renci.SshNet\bin\$(Configuration)\netstandard2.0</OutputDirectory>
7026
<Moniker>netstandard2.0</Moniker>
7127
</TargetFrameworkModern>
28+
<TargetFrameworkModern Include=".NET 6.0">
29+
<OutputDirectory>Renci.SshNet\bin\$(Configuration)\net6.0</OutputDirectory>
30+
<Moniker>net6.0</Moniker>
31+
</TargetFrameworkModern>
32+
<TargetFrameworkModern Include=".NET 7.0">
33+
<OutputDirectory>Renci.SshNet\bin\$(Configuration)\net7.0</OutputDirectory>
34+
<Moniker>net7.0</Moniker>
35+
</TargetFrameworkModern>
7236
</ItemGroup>
73-
74-
<Target Name="CleanClassic" DependsOnTargets="CleanSolutionClassic">
75-
<RemoveDir Directories="$(MSBuildThisFileDirectory)target"/>
76-
</Target>
77-
37+
7838
<Target Name="CleanModern" DependsOnTargets="CleanSolutionModern">
7939
<RemoveDir Directories="$(MSBuildThisFileDirectory)target"/>
8040
</Target>
8141

82-
<Target Name="CleanSolutionClassic" Outputs="%(VisualStudioVersionClassic.Identity)">
83-
<ItemGroup>
84-
<ProjectToBuild Remove="@(ProjectToBuild)"/>
85-
<ProjectToBuild Include="%(VisualStudioVersionClassic.SolutionFile)">
86-
<Properties>Configuration=Release;VisualStudioVersion=%(VisualStudioVersionClassic.VisualStudioVersion)</Properties>
87-
</ProjectToBuild>
88-
</ItemGroup>
89-
<MSBuild Projects="@(ProjectToBuild)" ToolsVersion="%(VisualStudioVersionClassic.ToolsVersion)" Targets="Clean"/>
90-
</Target>
9142

9243
<Target Name="CleanSolutionModern" Outputs="%(VisualStudioVersionModern.Identity)">
9344
<ItemGroup>
@@ -99,26 +50,11 @@
9950
<MSBuild Projects="@(ProjectToBuild)" Targets="Clean"/>
10051
</Target>
10152

102-
<Target Name="RestoreNuGetPackagesClassic" DependsOnTargets="DownloadNuGet" Outputs="%(VisualStudioVersionClassic.Identity)">
103-
<Message Text="Restoring nuget packages for '%(VisualStudioVersionClassic.SolutionFile)'..." Importance="High"/>
104-
<Exec Command="$(NuGetExe) restore &quot;%(VisualStudioVersionClassic.SolutionFile)&quot;"/>
105-
</Target>
106-
10753
<Target Name="RestoreNuGetPackagesModern" DependsOnTargets="DownloadNuGet" Outputs="%(VisualStudioVersionModern.Identity)">
10854
<Message Text="Restoring nuget packages for '%(VisualStudioVersionModern.SolutionFile)'..." Importance="High"/>
10955
<Exec Command="$(NuGetExe) restore &quot;%(VisualStudioVersionModern.SolutionFile)&quot;"/>
11056
</Target>
111-
112-
<Target Name="BuildClassic" DependsOnTargets="RestoreNuGetPackagesClassic" Outputs="%(VisualStudioVersionClassic.Identity)">
113-
<ItemGroup>
114-
<ProjectToBuild Remove="@(ProjectToBuild)"/>
115-
<ProjectToBuild Include="%(VisualStudioVersionClassic.SolutionFile)">
116-
<Properties>Configuration=Release;VisualStudioVersion=%(VisualStudioVersionClassic.VisualStudioVersion)</Properties>
117-
</ProjectToBuild>
118-
</ItemGroup>
119-
<MSBuild Projects="@(ProjectToBuild)" ToolsVersion="%(VisualStudioVersionClassic.ToolsVersion)" Targets="Rebuild"/>
120-
</Target>
121-
57+
12258
<Target Name="BuildModern" DependsOnTargets="RestoreNuGetPackagesModern" Outputs="%(VisualStudioVersionModern.Identity)">
12359
<ItemGroup>
12460
<ProjectToBuild Remove="@(ProjectToBuild)"/>
@@ -131,12 +67,7 @@
13167

13268
<Target Name="Package" DependsOnTargets="CreateNuGetPackage;CreateBinPackage;GenerateHelpFile"/>
13369

134-
<Target Name="ValidatePackage" DependsOnTargets="ValidatePackageClassic;ValidatePackageModern"/>
135-
136-
<Target Name="ValidatePackageClassic" DependsOnTargets="CheckNuGetPackageDirectory" Outputs="%(TargetFrameworkClassic.Identity)">
137-
<Error Text="The 'Renci.SshNet.dll' file is not available for %(TargetFrameworkClassic.Identity) in $(NuGetPackageDirectory)\lib\%(TargetFrameworkClassic.Moniker)." Condition="!Exists('$(NuGetPackageDirectory)\lib\%(TargetFrameworkClassic.Moniker)\Renci.SshNet.dll')"/>
138-
<Error Text="The 'Renci.SshNet.xml' file is not available for %(TargetFrameworkClassic.Identity) in $(NuGetPackageDirectory)\lib\%(TargetFrameworkClassic.Moniker)." Condition="!Exists('$(NuGetPackageDirectory)\lib\%(TargetFrameworkClassic.Moniker)\Renci.SshNet.xml')"/>
139-
</Target>
70+
<Target Name="ValidatePackage" DependsOnTargets="ValidatePackageModern"/>
14071

14172
<Target Name="ValidatePackageModern" DependsOnTargets="CheckNuGetPackageDirectory" Outputs="%(TargetFrameworkModern.Identity)">
14273
<Error Text="The 'Renci.SshNet.dll' file is not available for %(TargetFrameworkModern.Identity) in $(NuGetPackageDirectory)\lib\%(TargetFrameworkModern.Moniker)." Condition="!Exists('$(NuGetPackageDirectory)\lib\%(TargetFrameworkModern.Moniker)\Renci.SshNet.dll')"/>
@@ -153,16 +84,6 @@
15384
<Move SourceFiles="$(MSBuildThisFileDirectory)target\help\SshNet.Help.chm" DestinationFiles="$(MSBuildThisFileDirectory)target\SSH.NET-$(ReleaseVersion)-help.chm"/>
15485
</Target>
15586

156-
<Target Name="PreparePackageClassic" DependsOnTargets="BuildClassic;CheckNuGetPackageDirectory;CheckBinaryZipPackageDirectory" Outputs="%(TargetFrameworkClassic.Identity)">
157-
<ItemGroup>
158-
<BuildOutput Remove="@(BuildOutput)"/>
159-
<BuildOutput Include="$(MSBuildThisFileDirectory)..\src\%(TargetFrameworkClassic.OutputDirectory)\Renci.SshNet.dll"/>
160-
<BuildOutput Include="$(MSBuildThisFileDirectory)..\src\%(TargetFrameworkClassic.OutputDirectory)\Renci.SshNet.xml"/>
161-
</ItemGroup>
162-
<Copy SourceFiles="@(BuildOutput)" DestinationFolder="$(NuGetPackageDirectory)\lib\%(TargetFrameworkClassic.Moniker)"/>
163-
<Copy SourceFiles="@(BuildOutput)" DestinationFolder="$(BinPackageDirectory)\lib\%(TargetFrameworkClassic.Moniker)"/>
164-
</Target>
165-
16687
<Target Name="PreparePackageModern" DependsOnTargets="BuildModern;CheckNuGetPackageDirectory" Outputs="%(TargetFrameworkModern.Identity)">
16788
<ItemGroup>
16889
<BuildOutput Remove="@(BuildOutput)"/>

build/nuget/SSH.NET.nuspec

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,37 +16,15 @@
1616
<language>en-US</language>
1717
<tags>ssh scp sftp</tags>
1818
<dependencies>
19-
<group targetFramework="net35" />
20-
<group targetFramework="net40" />
21-
<group targetFramework="netstandard1.3">
22-
<dependency id="SshNet.Security.Cryptography" version="[1.3.0]" />
23-
<dependency id="System.Diagnostics.TraceSource" version="4.3.0" />
24-
<dependency id="System.Net.NameResolution" version="4.3.0" />
25-
<dependency id="System.Net.Sockets" version="4.3.0" />
26-
<dependency id="System.Threading.Thread" version="4.3.0" />
27-
<dependency id="System.Threading.ThreadPool" version="4.3.0" />
28-
<dependency id="System.Threading.Timer" version="4.3.0" />
29-
<dependency id="System.Xml.XmlDocument" version="4.3.0" />
30-
<dependency id="System.Xml.XPath.XmlDocument" version="4.3.0" />
31-
</group>
19+
<group targetFramework="net462" />
3220
<group targetFramework="netstandard2.0">
3321
<dependency id="SshNet.Security.Cryptography" version="[1.3.0]" />
3422
</group>
35-
<group targetFramework="sl4">
36-
<dependency id="SshNet.Security.Cryptography" version="[1.3.0]" />
37-
</group>
38-
<group targetFramework="sl5">
39-
<dependency id="SshNet.Security.Cryptography" version="[1.3.0]" />
40-
</group>
41-
<group targetFramework="wp71">
42-
<dependency id="SshNet.Security.Cryptography" version="[1.3.0]" />
43-
</group>
44-
<group targetFramework="wp8">
23+
<group targetFramework="net6.0">
4524
<dependency id="SshNet.Security.Cryptography" version="[1.3.0]" />
4625
</group>
47-
<group targetFramework="uap10.0">
26+
<group targetFramework="net7.0">
4827
<dependency id="SshNet.Security.Cryptography" version="[1.3.0]" />
49-
<dependency id="System.Xml.XPath.XmlDocument" version="4.3.0" />
5028
</group>
5129
</dependencies>
5230
</metadata>

build/sandcastle/SSH.NET.shfbproj

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
33
<PropertyGroup>
4-
<!--
5-
The configuration and platform will be used to determine which assemblies to include from solution and
6-
project documentation sources
7-
-->
4+
<!-- A target framework version is required by Visual Studio. It can be any version with a targeting pack installed. -->
5+
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
6+
<!-- The configuration and platform will be used to determine which assemblies to include from solution and
7+
project documentation sources -->
88
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
99
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
10+
1011
<SchemaVersion>2.0</SchemaVersion>
1112
<ProjectGuid>{f7266fb1-f50a-4a5b-b35a-5ea8ebdc1be9}</ProjectGuid>
12-
<SHFBSchemaVersion>2015.6.5.0</SHFBSchemaVersion>
13+
<SHFBSchemaVersion>2017.9.26.0</SHFBSchemaVersion>
1314
<!-- AssemblyName, Name, and RootNamespace are not used by SHFB but Visual Studio adds them anyway -->
1415
<AssemblyName>Documentation</AssemblyName>
1516
<RootNamespace>Documentation</RootNamespace>
1617
<Name>Documentation</Name>
1718
<!-- SHFB properties -->
18-
<FrameworkVersion>.NET Framework 4.0</FrameworkVersion>
19+
<FrameworkVersion>.NET Framework 4.7.2</FrameworkVersion>
1920
<OutputPath>..\target\help</OutputPath>
2021
<HtmlHelpName>SshNet.Help</HtmlHelpName>
2122
<Language>en-US</Language>
@@ -24,25 +25,15 @@
2425
<SyntaxFilters>C#</SyntaxFilters>
2526
<SdkLinkTarget>Blank</SdkLinkTarget>
2627
<RootNamespaceContainer>False</RootNamespaceContainer>
27-
<PresentationStyle>VS2010</PresentationStyle>
28+
<PresentationStyle>VS2013</PresentationStyle>
2829
<Preliminary>False</Preliminary>
2930
<NamingMethod>Guid</NamingMethod>
3031
<HelpTitle>SSH.NET Client Library Documentation</HelpTitle>
3132
<ContentPlacement>AboveNamespaces</ContentPlacement>
32-
<ComponentConfigurations>
33-
<ComponentConfig id="Code Block Component" enabled="True">
34-
<component id="Code Block Component">
35-
<basePath value="{@HtmlEncProjectFolder}" />
36-
<outputPaths>{@HelpFormatOutputPaths}</outputPaths>
37-
<allowMissingSource value="false" />
38-
<removeRegionMarkers value="false" />
39-
<colorizer syntaxFile="{@SHFBROOT}\PresentationStyles\Colorizer\highlight.xml" styleFile="{@SHFBROOT}\PresentationStyles\Colorizer\highlight.xsl" stylesheet="{@SHFBROOT}\PresentationStyles\Colorizer\highlight.css" scriptFile="{@SHFBROOT}\PresentationStyles\Colorizer\highlight.js" disabled="{@DisableCodeBlockComponent}" language="cs" tabSize="0" numberLines="false" outlining="false" keepSeeTags="false" defaultTitle="true" />
40-
</component>
41-
</ComponentConfig>
42-
</ComponentConfigurations>
33+
4334
<DocumentationSources>
44-
<DocumentationSource sourceFile="..\..\src\Renci.SshNet\bin\Release\net40\Renci.SshNet.dll" xmlns="" />
45-
<DocumentationSource sourceFile="..\..\src\Renci.SshNet\bin\Release\net40\Renci.SshNet.xml" xmlns="" />
35+
<DocumentationSource sourceFile="..\..\src\Renci.SshNet\bin\Release\net462\Renci.SshNet.dll" xmlns="" />
36+
<DocumentationSource sourceFile="..\..\src\Renci.SshNet\bin\Release\net462\Renci.SshNet.xml" xmlns="" />
4637
</DocumentationSources>
4738
<MissingTags>Summary, Parameter, Returns, AutoDocumentCtors, TypeParameter, AutoDocumentDispose</MissingTags>
4839
<BuildAssemblerVerbosity>OnlyWarningsAndErrors</BuildAssemblerVerbosity>
@@ -54,7 +45,7 @@
5445
<CleanIntermediates>True</CleanIntermediates>
5546
</PropertyGroup>
5647
<!-- There are no properties for these groups. AnyCPU needs to appear in order for Visual Studio to perform
57-
the build. The others are optional common platform types that may appear. -->
48+
the build. The others are optional common platform types that may appear. -->
5849
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
5950
</PropertyGroup>
6051
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">

src/Renci.SshNet/Renci.SshNet.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@
77
<AssemblyOriginatorKeyFile>../Renci.SshNet.snk</AssemblyOriginatorKeyFile>
88
<LangVersion>6</LangVersion>
99
<SignAssembly>true</SignAssembly>
10-
<TargetFrameworks>net462;netstandard2.0;net7.0</TargetFrameworks>
10+
<TargetFrameworks>net462;netstandard2.0;net6.0;net7.0</TargetFrameworks>
1111
</PropertyGroup>
1212

1313
<PropertyGroup Condition=" '$(TargetFramework)' == 'net462' ">
1414
<DefineConstants>FEATURE_STRINGBUILDER_CLEAR;FEATURE_HASHALGORITHM_DISPOSE;FEATURE_REGEX_COMPILE;FEATURE_BINARY_SERIALIZATION;FEATURE_RNG_CREATE;FEATURE_SOCKET_SYNC;FEATURE_SOCKET_EAP;FEATURE_SOCKET_APM;FEATURE_SOCKET_SELECT;FEATURE_SOCKET_POLL;FEATURE_SOCKET_DISPOSE;FEATURE_STREAM_APM;FEATURE_DNS_SYNC;FEATURE_THREAD_COUNTDOWNEVENT;FEATURE_THREAD_THREADPOOL;FEATURE_THREAD_SLEEP;FEATURE_WAITHANDLE_DISPOSE;FEATURE_HASH_MD5;FEATURE_HASH_SHA1_CREATE;FEATURE_HASH_SHA256_CREATE;FEATURE_HASH_SHA384_CREATE;FEATURE_HASH_SHA512_CREATE;FEATURE_HASH_RIPEMD160_CREATE;FEATURE_HMAC_MD5;FEATURE_HMAC_SHA1;FEATURE_HMAC_SHA256;FEATURE_HMAC_SHA384;FEATURE_HMAC_SHA512;FEATURE_HMAC_RIPEMD160;FEATURE_MEMORYSTREAM_GETBUFFER;FEATURE_DIAGNOSTICS_TRACESOURCE;FEATURE_ENCODING_ASCII;FEATURE_ECDSA;FEATURE_TAP</DefineConstants>
1515
</PropertyGroup>
1616

17-
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netstandard2.1' or '$(TargetFramework)' == 'net7.0' ">
17+
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'net6.0' or '$(TargetFramework)' == 'net7.0' ">
1818
<PackageReference Include="SshNet.Security.Cryptography" Version="[1.3.0]" />
1919
</ItemGroup>
2020

21-
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netstandard2.1' or '$(TargetFramework)' == 'net7.0' ">
21+
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'net6.0' or '$(TargetFramework)' == 'net7.0' ">
2222
<DefineConstants>FEATURE_STRINGBUILDER_CLEAR;FEATURE_HASHALGORITHM_DISPOSE;FEATURE_ENCODING_ASCII;FEATURE_DIAGNOSTICS_TRACESOURCE;FEATURE_DIRECTORYINFO_ENUMERATEFILES;FEATURE_MEMORYSTREAM_GETBUFFER;FEATURE_MEMORYSTREAM_TRYGETBUFFER;FEATURE_RNG_CREATE;FEATURE_SOCKET_TAP;FEATURE_SOCKET_APM;FEATURE_SOCKET_EAP;FEATURE_SOCKET_SYNC;FEATURE_SOCKET_SELECT;FEATURE_SOCKET_POLL;FEATURE_SOCKET_DISPOSE;FEATURE_DNS_SYNC;FEATURE_DNS_APM;FEATURE_DNS_TAP;FEATURE_STREAM_APM;FEATURE_STREAM_TAP;FEATURE_THREAD_COUNTDOWNEVENT;FEATURE_THREAD_TAP;FEATURE_THREAD_THREADPOOL;FEATURE_THREAD_SLEEP;FEATURE_WAITHANDLE_DISPOSE;FEATURE_HASH_MD5;FEATURE_HASH_SHA1_CREATE;FEATURE_HASH_SHA256_CREATE;FEATURE_HASH_SHA384_CREATE;FEATURE_HASH_SHA512_CREATE;FEATURE_HMAC_MD5;FEATURE_HMAC_SHA1;FEATURE_HMAC_SHA256;FEATURE_HMAC_SHA384;FEATURE_HMAC_SHA512;FEATURE_ECDSA;FEATURE_TAP</DefineConstants>
2323
</PropertyGroup>
2424
</Project>

0 commit comments

Comments
 (0)