Sfoglia il codice sorgente

Add partial support for UWP/UAP 10.0, and prepare to support .NET Core 1.0.
Still very much work-in-progress.
Moved some target framework specific code to "abstraction" classes.

drieseng 9 anni fa
parent
commit
f6700e05b9
71 ha cambiato i file con 1530 aggiunte e 546 eliminazioni
  1. 0 13
      src/Renci.SshNet.NET35/ForwardedPortDynamic.NET35.cs
  2. 0 19
      src/Renci.SshNet.NET35/ForwardedPortLocal.NET35.cs
  3. 0 16
      src/Renci.SshNet.NET35/ForwardedPortRemote.NET35.cs
  4. 11 11
      src/Renci.SshNet.NET35/Renci.SshNet.NET35.csproj
  5. 0 5
      src/Renci.SshNet.NET35/Session.NET35.cs
  6. 0 16
      src/Renci.SshNet.NET35/SftpClient.NET35.cs
  7. 0 16
      src/Renci.SshNet.NET35/Shell.NET35.cs
  8. 0 16
      src/Renci.SshNet.NET35/ShellStream.NET35.cs
  9. 0 16
      src/Renci.SshNet.NET35/SshCommand.NET35.cs
  10. 0 5
      src/Renci.SshNet.Silverlight/Session.SilverlightShared.cs
  11. 7 25
      src/Renci.SshNet.Silverlight5/Renci.SshNet.Silverlight5.csproj
  12. 10 0
      src/Renci.SshNet.UAP10/Properties/AssemblyInfo.cs
  13. 33 0
      src/Renci.SshNet.UAP10/Properties/Renci.SshNet.UAP10.rd.xml
  14. 988 0
      src/Renci.SshNet.UAP10/Renci.SshNet.UAP10.csproj
  15. 18 0
      src/Renci.SshNet.UAP10/project.json
  16. 51 1
      src/Renci.SshNet.VS2015.sln
  17. 2 0
      src/Renci.SshNet.VS2015.sln.DotSettings
  18. 8 20
      src/Renci.SshNet.WindowsPhone8/Renci.SshNet.WindowsPhone8.csproj
  19. 41 0
      src/Renci.SshNet/Abstractions/DnsAbstraction.cs
  20. 21 0
      src/Renci.SshNet/Abstractions/ReflectionAbstraction.cs
  21. 35 0
      src/Renci.SshNet/Abstractions/ThreadAbstraction.cs
  22. 6 7
      src/Renci.SshNet/BaseClient.cs
  23. 3 3
      src/Renci.SshNet/Channels/ChannelDirectTcpip.cs
  24. 3 4
      src/Renci.SshNet/Channels/ChannelForwardedTcpip.cs
  25. 2 1
      src/Renci.SshNet/Channels/ChannelSession.cs
  26. 2 2
      src/Renci.SshNet/Common/AsyncResult.cs
  27. 2 1
      src/Renci.SshNet/Common/BigInteger.cs
  28. 2 1
      src/Renci.SshNet/Common/Extensions.NET.cs
  29. 0 4
      src/Renci.SshNet/Common/Extensions.NET40.cs
  30. 2 1
      src/Renci.SshNet/Common/Extensions.cs
  31. 31 19
      src/Renci.SshNet/Common/SshData.cs
  32. 14 0
      src/Renci.SshNet/Common/SshDataStream.cs
  33. 53 15
      src/Renci.SshNet/ForwardedPortDynamic.NET.cs
  34. 0 17
      src/Renci.SshNet/ForwardedPortDynamic.NET40.cs
  35. 0 6
      src/Renci.SshNet/ForwardedPortDynamic.cs
  36. 41 7
      src/Renci.SshNet/ForwardedPortLocal.NET.cs
  37. 0 20
      src/Renci.SshNet/ForwardedPortLocal.NET40.cs
  38. 5 2
      src/Renci.SshNet/ForwardedPortRemote.NET.cs
  39. 0 20
      src/Renci.SshNet/ForwardedPortRemote.NET40.cs
  40. 3 4
      src/Renci.SshNet/ForwardedPortRemote.cs
  41. 0 17
      src/Renci.SshNet/KeyboardInteractiveAuthenticationMethod.NET40.cs
  42. 2 4
      src/Renci.SshNet/KeyboardInteractiveAuthenticationMethod.cs
  43. 8 4
      src/Renci.SshNet/Messages/Authentication/InformationRequestMessage.cs
  44. 7 7
      src/Renci.SshNet/Messages/Message.cs
  45. 2 1
      src/Renci.SshNet/Messages/Transport/KeyExchangeInitMessage.cs
  46. 0 17
      src/Renci.SshNet/PasswordAuthenticationMethod.NET40.cs
  47. 2 4
      src/Renci.SshNet/PasswordAuthenticationMethod.cs
  48. 4 4
      src/Renci.SshNet/PrivateKeyFile.cs
  49. 4 14
      src/Renci.SshNet/Renci.SshNet.csproj
  50. 1 1
      src/Renci.SshNet/ScpClient.NET.cs
  51. 2 3
      src/Renci.SshNet/ScpClient.cs
  52. 1 1
      src/Renci.SshNet/Security/Cryptography/DsaDigitalSignature.cs
  53. 12 1
      src/Renci.SshNet/Security/Cryptography/HashAlgorithmFactory.cs
  54. 1 1
      src/Renci.SshNet/Security/Cryptography/RsaDigitalSignature.cs
  55. 0 5
      src/Renci.SshNet/Security/KeyExchangeDiffieHellman.cs
  56. 0 3
      src/Renci.SshNet/ServiceFactory.NET.cs
  57. 27 9
      src/Renci.SshNet/Session.NET.cs
  58. 0 11
      src/Renci.SshNet/Session.NET40.cs
  59. 15 21
      src/Renci.SshNet/Session.cs
  60. 1 1
      src/Renci.SshNet/Sftp/Responses/SftpNameResponse.cs
  61. 10 3
      src/Renci.SshNet/Sftp/Responses/SftpStatusResponse.cs
  62. 3 3
      src/Renci.SshNet/Sftp/SftpSession.cs
  63. 2 1
      src/Renci.SshNet/SftpClient.NET.cs
  64. 0 20
      src/Renci.SshNet/SftpClient.NET40.cs
  65. 7 8
      src/Renci.SshNet/SftpClient.cs
  66. 0 17
      src/Renci.SshNet/Shell.NET40.cs
  67. 21 6
      src/Renci.SshNet/Shell.cs
  68. 0 20
      src/Renci.SshNet/ShellStream.NET40.cs
  69. 2 3
      src/Renci.SshNet/ShellStream.cs
  70. 0 20
      src/Renci.SshNet/SshCommand.NET40.cs
  71. 2 3
      src/Renci.SshNet/SshCommand.cs

+ 0 - 13
src/Renci.SshNet.NET35/ForwardedPortDynamic.NET35.cs

@@ -1,13 +0,0 @@
-using System;
-using System.Threading;
-
-namespace Renci.SshNet
-{
-    public partial class ForwardedPortDynamic
-    {
-        partial void ExecuteThread(Action action)
-        {
-            ThreadPool.QueueUserWorkItem((o) => { action(); });
-        }
-    }
-}

+ 0 - 19
src/Renci.SshNet.NET35/ForwardedPortLocal.NET35.cs

@@ -1,19 +0,0 @@
-using System;
-using System.Net.Sockets;
-using System.Net;
-using System.Threading;
-using Renci.SshNet.Channels;
-
-namespace Renci.SshNet
-{
-    /// <summary>
-    /// Provides functionality for local port forwarding
-    /// </summary>
-    public partial class ForwardedPortLocal
-    {
-        partial void ExecuteThread(Action action)
-        {
-            ThreadPool.QueueUserWorkItem((o) => { action(); });
-        }
-    }
-}

+ 0 - 16
src/Renci.SshNet.NET35/ForwardedPortRemote.NET35.cs

@@ -1,16 +0,0 @@
-using System;
-using System.Threading;
-
-namespace Renci.SshNet
-{
-    /// <summary>
-    /// Provides functionality for remote port forwarding
-    /// </summary>
-    public partial class ForwardedPortRemote
-    {
-        partial void ExecuteThread(Action action)
-        {
-            ThreadPool.QueueUserWorkItem((o) => { action(); });
-        }
-    }
-}

+ 11 - 11
src/Renci.SshNet.NET35/Renci.SshNet.NET35.csproj

@@ -18,7 +18,7 @@
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>TRACE;DEBUG;TUNING;FEATURE_HASH_MD5;FEATURE_HASH_SHA1;FEATURE_HASH_SHA256;FEATURE_HASH_SHA384;FEATURE_HASH_SHA512;FEATURE_HASH_RIPEMD160;FEATURE_HMAC_MD5;FEATURE_HMAC_SHA1;FEATURE_HMAC_SHA256;FEATURE_HMAC_SHA384;FEATURE_HMAC_SHA512;FEATURE_HMAC_RIPEMD160</DefineConstants>
+    <DefineConstants>TRACE;DEBUG;TUNING;FEATURE_HASH_MD5;FEATURE_HASH_SHA1;FEATURE_HASH_SHA256;FEATURE_HASH_SHA384;FEATURE_HASH_SHA512;FEATURE_HASH_RIPEMD160;FEATURE_HMAC_MD5;FEATURE_HMAC_SHA1;FEATURE_HMAC_SHA256;FEATURE_HMAC_SHA384;FEATURE_HMAC_SHA512;FEATURE_HMAC_RIPEMD160;FEATURE_THREAD_SLEEP;FEATURE_MEMORYSTREAM_GETBUFFER</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
@@ -47,6 +47,15 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="..\Renci.SshNet\Abstractions\DnsAbstraction.cs">
+      <Link>Abstractions\DnsAbstraction.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Abstractions\ReflectionAbstraction.cs">
+      <Link>Abstractions\ReflectionAbstraction.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Abstractions\ThreadAbstraction.cs">
+      <Link>Abstractions\ThreadAbstraction.cs</Link>
+    </Compile>
     <Compile Include="..\Renci.SshNet\AuthenticationMethod.cs">
       <Link>AuthenticationMethod.cs</Link>
     </Compile>
@@ -916,20 +925,11 @@
     </Compile>
     <Compile Include="Channels\ChannelDirectTcpip.NET35.cs" />
     <Compile Include="Common\Extensions.NET35.cs" />
-    <Compile Include="ShellStream.NET35.cs" />
-    <Compile Include="ForwardedPortDynamic.NET35.cs" />
-    <Compile Include="ForwardedPortLocal.NET35.cs" />
-    <Compile Include="ForwardedPortRemote.NET35.cs" />
-    <Compile Include="KeyboardInteractiveAuthenticationMethod.NET35.cs" />
-    <Compile Include="PasswordAuthenticationMethod.NET35.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="..\Renci.SshNet\Properties\CommonAssemblyInfo.cs">
       <Link>Properties\CommonAssemblyInfo.cs</Link>
     </Compile>
     <Compile Include="Session.NET35.cs" />
-    <Compile Include="SftpClient.NET35.cs" />
-    <Compile Include="Shell.NET35.cs" />
-    <Compile Include="SshCommand.NET35.cs" />
   </ItemGroup>
   <ItemGroup>
     <Folder Include="Documentation\" />
@@ -942,7 +942,7 @@
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <ProjectExtensions>
     <VisualStudio>
-      <UserProperties ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" />
+      <UserProperties ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" />
     </VisualStudio>
   </ProjectExtensions>
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 

+ 0 - 5
src/Renci.SshNet.NET35/Session.NET35.cs

@@ -60,11 +60,6 @@ namespace Renci.SshNet
             }
         }
 
-        partial void ExecuteThread(Action action)
-        {
-            ThreadPool.QueueUserWorkItem((o) => { action(); });
-        }
-
         partial void InternalRegisterMessage(string messageName)
         {
             lock (this._messagesMetadata)

+ 0 - 16
src/Renci.SshNet.NET35/SftpClient.NET35.cs

@@ -1,16 +0,0 @@
-using System;
-using System.Threading;
-
-namespace Renci.SshNet
-{
-    /// <summary>
-    /// 
-    /// </summary>
-    public partial class SftpClient
-    {
-        partial void ExecuteThread(Action action)
-        {
-            ThreadPool.QueueUserWorkItem((o) => { action(); });
-        }
-    }
-}

+ 0 - 16
src/Renci.SshNet.NET35/Shell.NET35.cs

@@ -1,16 +0,0 @@
-using System;
-using System.Threading;
-
-namespace Renci.SshNet
-{
-    /// <summary>
-    /// Represents instance of the SSH shell object
-    /// </summary>
-    public partial class Shell
-    {
-        partial void ExecuteThread(Action action)
-        {
-            ThreadPool.QueueUserWorkItem((o) => { action(); });
-        }
-    }
-}

+ 0 - 16
src/Renci.SshNet.NET35/ShellStream.NET35.cs

@@ -1,16 +0,0 @@
-using System;
-using System.Threading;
-
-namespace Renci.SshNet
-{
-    /// <summary>
-    /// Represents instance of the SSH shell object
-    /// </summary>
-    public partial class ShellStream
-    {
-        partial void ExecuteThread(Action action)
-        {
-            ThreadPool.QueueUserWorkItem((o) => { action(); });
-        }
-    }
-}

+ 0 - 16
src/Renci.SshNet.NET35/SshCommand.NET35.cs

@@ -1,16 +0,0 @@
-using System;
-using System.Threading;
-
-namespace Renci.SshNet
-{
-    /// <summary>
-    /// Represents SSH command that can be executed.
-    /// </summary>
-    public partial class SshCommand
-    {
-        partial void ExecuteThread(Action action)
-        {
-            ThreadPool.QueueUserWorkItem((o) => { action(); });
-        }
-    }
-}

+ 0 - 5
src/Renci.SshNet.Silverlight/Session.SilverlightShared.cs

@@ -213,11 +213,6 @@ namespace Renci.SshNet
                 } while (totalBytesSent < totalBytesToSend);
         }
 
-        partial void ExecuteThread(Action action)
-        {
-            ThreadPool.QueueUserWorkItem(o => action());
-        }
-
         partial void InternalRegisterMessage(string messageName)
         {
             lock (_messagesMetadata)

+ 7 - 25
src/Renci.SshNet.Silverlight5/Renci.SshNet.Silverlight5.csproj

@@ -29,7 +29,7 @@
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <OutputPath>Bin\Debug</OutputPath>
-    <DefineConstants>TRACE;DEBUG;SILVERLIGHT;TUNING;FEATURE_HASH_SHA1;FEATURE_HASH_SHA256;FEATURE_HMAC_SHA1;FEATURE_HMAC_SHA256</DefineConstants>
+    <DefineConstants>TRACE;DEBUG;SILVERLIGHT;TUNING;FEATURE_HASH_SHA1;FEATURE_HASH_SHA256;FEATURE_HMAC_SHA1;FEATURE_HMAC_SHA256;FEATURE_RNG_CRYPTO;FEATURE_THREAD_SLEEP;FEATURE_MEMORYSTREAM_GETBUFFER</DefineConstants>
     <NoStdLib>true</NoStdLib>
     <NoConfig>true</NoConfig>
     <ErrorReport>prompt</ErrorReport>
@@ -57,10 +57,7 @@
     <AssemblyOriginatorKeyFile>..\Renci.SshNet.snk</AssemblyOriginatorKeyFile>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="Microsoft.CSharp, Version=5.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>C:\Program Files (x86)\Microsoft SDKs\Silverlight\v5.0\Libraries\Client\Microsoft.CSharp.dll</HintPath>
-    </Reference>
+    <Reference Include="Microsoft.CSharp, Version=5.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
     <Reference Include="mscorlib" />
     <Reference Include="Renci.Security.Cryptography, Version=1.0.0.0, Culture=neutral, PublicKeyToken=50c6375d29e47192, processorArchitecture=MSIL">
       <HintPath>..\..\packages\Renci.Security.Cryptography.1.0.0\lib\sl5\Renci.Security.Cryptography.dll</HintPath>
@@ -78,15 +75,6 @@
     <Compile Include="..\Renci.SshNet.Silverlight\ForwardedPortLocal.SilverlightShared.cs">
       <Link>ForwardedPortLocal.SilverlightShared.cs</Link>
     </Compile>
-    <Compile Include="..\Renci.SshNet.Silverlight\ForwardedPortRemote.SilverlightShared.cs">
-      <Link>ForwardedPortRemote.SilverlightShared.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Silverlight\KeyboardInteractiveAuthenticationMethod.SilverlightShared.cs">
-      <Link>KeyboardInteractiveAuthenticationMethod.SilverlightShared.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Silverlight\PasswordAuthenticationMethod.SilverlightShared.cs">
-      <Link>PasswordAuthenticationMethod.SilverlightShared.cs</Link>
-    </Compile>
     <Compile Include="..\Renci.SshNet.Silverlight\ScpClient.SilverlightShared.cs">
       <Link>ScpClient.SilverlightShared.cs</Link>
     </Compile>
@@ -96,17 +84,11 @@
     <Compile Include="..\Renci.SshNet.Silverlight\Session.SilverlightShared.cs">
       <Link>Session.SilverlightShared.cs</Link>
     </Compile>
-    <Compile Include="..\Renci.SshNet.Silverlight\SftpClient.SilverlightShared.cs">
-      <Link>SftpClient.SilverlightShared.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Silverlight\Shell.SilverlightShared.cs">
-      <Link>Shell.SilverlightShared.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Silverlight\ShellStream.SilverlightShared.cs">
-      <Link>ShellStream.SilverlightShared.cs</Link>
+    <Compile Include="..\Renci.SshNet\Abstractions\ReflectionAbstraction.cs">
+      <Link>Abstractions\ReflectionAbstraction.cs</Link>
     </Compile>
-    <Compile Include="..\Renci.SshNet.Silverlight\SshCommand.SilverlightShared.cs">
-      <Link>SshCommand.SilverlightShared.cs</Link>
+    <Compile Include="..\Renci.SshNet\Abstractions\ThreadAbstraction.cs">
+      <Link>Abstractions\ThreadAbstraction.cs</Link>
     </Compile>
     <Compile Include="..\Renci.SshNet\AuthenticationMethod.cs">
       <Link>AuthenticationMethod.cs</Link>
@@ -926,7 +908,7 @@
       <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
         <SilverlightProjectProperties />
       </FlavorProperties>
-      <UserProperties ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" />
+      <UserProperties ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" />
     </VisualStudio>
   </ProjectExtensions>
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 

+ 10 - 0
src/Renci.SshNet.UAP10/Properties/AssemblyInfo.cs

@@ -0,0 +1,10 @@
+using System.Reflection;
+using System.Runtime.InteropServices;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle("SSH.NET UAP 10.0")]
+[assembly: InternalsVisibleTo("Renci.SshNet.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f9194e1eb66b7e2575aaee115ee1d27bc100920e7150e43992d6f668f9737de8b9c7ae892b62b8a36dd1d57929ff1541665d101dc476d6e02390846efae7e5186eec409710fdb596e3f83740afef0d4443055937649bc5a773175b61c57615dac0f0fd10f52b52fedf76c17474cc567b3f7a79de95dde842509fb39aaf69c6c2")]
+[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")]
+
+// https://github.com/dotnet/corefx/issues/7274
+//[assembly: Guid("4EE4F2DC-208D-42B2-B286-5E5DEC1DD766")]

+ 33 - 0
src/Renci.SshNet.UAP10/Properties/Renci.SshNet.UAP10.rd.xml

@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+    This file contains Runtime Directives, specifications about types your application accesses
+    through reflection and other dynamic code patterns. Runtime Directives are used to control the
+    .NET Native optimizer and ensure that it does not remove code accessed by your library. If your
+    library does not do any reflection, then you generally do not need to edit this file. However,
+    if your library reflects over types, especially types passed to it or derived from its types,
+    then you should write Runtime Directives.
+
+    The most common use of reflection in libraries is to discover information about types passed
+    to the library. Runtime Directives have three ways to express requirements on types passed to
+    your library.
+
+    1.  Parameter, GenericParameter, TypeParameter, TypeEnumerableParameter
+        Use these directives to reflect over types passed as a parameter.
+
+    2.  SubTypes
+        Use a SubTypes directive to reflect over types derived from another type.
+
+    3.  AttributeImplies
+        Use an AttributeImplies directive to indicate that your library needs to reflect over
+        types or methods decorated with an attribute.
+
+    For more information on writing Runtime Directives for libraries, please visit
+    http://go.microsoft.com/fwlink/?LinkID=391919
+-->
+<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
+  <Library Name="Renci.SshNet.UAP10">
+
+  	<!-- add directives for your library here -->
+
+  </Library>
+</Directives>

+ 988 - 0
src/Renci.SshNet.UAP10/Renci.SshNet.UAP10.csproj

@@ -0,0 +1,988 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{EC212E04-A372-4B95-B45B-C0D4A739EF80}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Renci.SshNet</RootNamespace>
+    <AssemblyName>Renci.SshNet</AssemblyName>
+    <DefaultLanguage>en-US</DefaultLanguage>
+    <TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
+    <TargetPlatformVersion>10.0.10240.0</TargetPlatformVersion>
+    <TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
+    <MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>TRACE;DEBUG;TUNING;FEATURE_STREAM_ASYNC_TPL;FEATURE_SOCKET_EAP;FEATURE_DNS_ASYNC;FEATURE_TPL;FEATURE_SOCKET_TAP;FEATURE_REFLECTION_TYPEINFO</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
+    <PlatformTarget>x86</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x86\Debug\</OutputPath>
+    <DefineConstants>TRACE;DEBUG;TUNING;FEATURE_STREAM_ASYNC_TPL;FEATURE_SOCKET_EAP</DefineConstants>
+    <NoWarn>;2008</NoWarn>
+    <DebugType>full</DebugType>
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <UseVSHostingProcess>false</UseVSHostingProcess>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
+    <PlatformTarget>x86</PlatformTarget>
+    <OutputPath>bin\x86\Release\</OutputPath>
+    <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+    <Optimize>true</Optimize>
+    <NoWarn>;2008</NoWarn>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <UseVSHostingProcess>false</UseVSHostingProcess>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
+    <PlatformTarget>ARM</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\ARM\Debug\</OutputPath>
+    <DefineConstants>TRACE;DEBUG;TUNING;FEATURE_STREAM_ASYNC_TPL;FEATURE_SOCKET_EAP;FEATURE_SOCKET_TAP;FEATURE_TPL;FEATURE_DNS_ASYNC;FEATURE_REFLECTION_TYPEINFO</DefineConstants>
+    <NoWarn>;2008</NoWarn>
+    <DebugType>full</DebugType>
+    <PlatformTarget>ARM</PlatformTarget>
+    <UseVSHostingProcess>false</UseVSHostingProcess>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
+    <PlatformTarget>ARM</PlatformTarget>
+    <OutputPath>bin\ARM\Release\</OutputPath>
+    <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+    <Optimize>true</Optimize>
+    <NoWarn>;2008</NoWarn>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>ARM</PlatformTarget>
+    <UseVSHostingProcess>false</UseVSHostingProcess>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+    <PlatformTarget>x64</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x64\Debug\</OutputPath>
+    <DefineConstants>TRACE;DEBUG;TUNING;FEATURE_STREAM_ASYNC_TPL;FEATURE_SOCKET_EAP</DefineConstants>
+    <NoWarn>;2008</NoWarn>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <UseVSHostingProcess>false</UseVSHostingProcess>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+    <PlatformTarget>x64</PlatformTarget>
+    <OutputPath>bin\x64\Release\</OutputPath>
+    <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+    <Optimize>true</Optimize>
+    <NoWarn>;2008</NoWarn>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <UseVSHostingProcess>false</UseVSHostingProcess>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <ItemGroup>
+    <!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
+    <None Include="project.json" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="..\Renci.SshNet\Abstractions\DnsAbstraction.cs">
+      <Link>Abstractions\DnsAbstraction.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Abstractions\ReflectionAbstraction.cs">
+      <Link>Abstractions\ReflectionAbstraction.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Abstractions\ThreadAbstraction.cs">
+      <Link>Abstractions\ThreadAbstraction.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\AuthenticationMethod.cs">
+      <Link>AuthenticationMethod.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\AuthenticationResult.cs">
+      <Link>AuthenticationResult.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\BaseClient.cs">
+      <Link>BaseClient.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Channels\Channel.cs">
+      <Link>Channels\Channel.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Channels\ChannelDirectTcpip.cs">
+      <Link>Channels\ChannelDirectTcpip.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Channels\ChannelDirectTcpip.NET40.cs">
+      <Link>Channels\ChannelDirectTcpip.NET40.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Channels\ChannelForwardedTcpip.cs">
+      <Link>Channels\ChannelForwardedTcpip.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Channels\ChannelForwardedTcpip.NET40.cs">
+      <Link>Channels\ChannelForwardedTcpip.NET40.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Channels\ChannelSession.cs">
+      <Link>Channels\ChannelSession.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Channels\ChannelTypes.cs">
+      <Link>Channels\ChannelTypes.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Channels\ClientChannel.cs">
+      <Link>Channels\ClientChannel.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Channels\IChannel.cs">
+      <Link>Channels\IChannel.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Channels\IChannelDirectTcpip.cs">
+      <Link>Channels\IChannelDirectTcpip.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Channels\IChannelForwardedTcpip.cs">
+      <Link>Channels\IChannelForwardedTcpip.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Channels\IChannelSession.cs">
+      <Link>Channels\IChannelSession.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Channels\ServerChannel.cs">
+      <Link>Channels\ServerChannel.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\CipherInfo.cs">
+      <Link>CipherInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ClientAuthentication.cs">
+      <Link>ClientAuthentication.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\CommandAsyncResult.cs">
+      <Link>CommandAsyncResult.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ASCIIEncoding.cs">
+      <Link>Common\ASCIIEncoding.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\AsyncResult.cs">
+      <Link>Common\AsyncResult.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\AuthenticationBannerEventArgs.cs">
+      <Link>Common\AuthenticationBannerEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\AuthenticationEventArgs.cs">
+      <Link>Common\AuthenticationEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\AuthenticationPasswordChangeEventArgs.cs">
+      <Link>Common\AuthenticationPasswordChangeEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\AuthenticationPrompt.cs">
+      <Link>Common\AuthenticationPrompt.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\AuthenticationPromptEventArgs.cs">
+      <Link>Common\AuthenticationPromptEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\BigInteger.cs">
+      <Link>Common\BigInteger.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ChannelDataEventArgs.cs">
+      <Link>Common\ChannelDataEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ChannelEventArgs.cs">
+      <Link>Common\ChannelEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ChannelExtendedDataEventArgs.cs">
+      <Link>Common\ChannelExtendedDataEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ChannelOpenConfirmedEventArgs.cs">
+      <Link>Common\ChannelOpenConfirmedEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ChannelOpenFailedEventArgs.cs">
+      <Link>Common\ChannelOpenFailedEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ChannelRequestEventArgs.cs">
+      <Link>Common\ChannelRequestEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\DerData.cs">
+      <Link>Common\DerData.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ExceptionEventArgs.cs">
+      <Link>Common\ExceptionEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\Extensions.cs">
+      <Link>Common\Extensions.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\Extensions.NET.cs">
+      <Link>Common\Extensions.NET.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\Extensions.NET40.cs">
+      <Link>Common\Extensions.NET40.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\HostKeyEventArgs.cs">
+      <Link>Common\HostKeyEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\NetConfServerException.cs">
+      <Link>Common\NetConfServerException.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ObjectIdentifier.cs">
+      <Link>Common\ObjectIdentifier.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\PipeStream.cs">
+      <Link>Common\PipeStream.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\PortForwardEventArgs.cs">
+      <Link>Common\PortForwardEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ProxyException.cs">
+      <Link>Common\ProxyException.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ScpDownloadEventArgs.cs">
+      <Link>Common\ScpDownloadEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ScpException.cs">
+      <Link>Common\ScpException.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ScpUploadEventArgs.cs">
+      <Link>Common\ScpUploadEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SemaphoreLight.cs">
+      <Link>Common\SemaphoreLight.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SftpPathNotFoundException.cs">
+      <Link>Common\SftpPathNotFoundException.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SftpPermissionDeniedException.cs">
+      <Link>Common\SftpPermissionDeniedException.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ShellDataEventArgs.cs">
+      <Link>Common\ShellDataEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SshAuthenticationException.cs">
+      <Link>Common\SshAuthenticationException.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SshConnectionException.cs">
+      <Link>Common\SshConnectionException.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SshData.cs">
+      <Link>Common\SshData.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SshDataStream.cs">
+      <Link>Common\SshDataStream.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SshException.cs">
+      <Link>Common\SshException.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SshOperationTimeoutException.cs">
+      <Link>Common\SshOperationTimeoutException.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SshPassPhraseNullOrEmptyException.cs">
+      <Link>Common\SshPassPhraseNullOrEmptyException.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\TerminalModes.cs">
+      <Link>Common\TerminalModes.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Compression\CompressionMode.cs">
+      <Link>Compression\CompressionMode.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Compression\Compressor.cs">
+      <Link>Compression\Compressor.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Compression\Zlib.cs">
+      <Link>Compression\Zlib.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Compression\ZlibOpenSsh.cs">
+      <Link>Compression\ZlibOpenSsh.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Compression\ZlibStream.cs">
+      <Link>Compression\ZlibStream.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ConnectionInfo.cs">
+      <Link>ConnectionInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ExpectAction.cs">
+      <Link>ExpectAction.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ExpectAsyncResult.cs">
+      <Link>ExpectAsyncResult.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ForwardedPort.cs">
+      <Link>ForwardedPort.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ForwardedPortDynamic.cs">
+      <Link>ForwardedPortDynamic.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ForwardedPortDynamic.NET.cs">
+      <Link>ForwardedPortDynamic.NET.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ForwardedPortLocal.cs">
+      <Link>ForwardedPortLocal.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ForwardedPortLocal.NET.cs">
+      <Link>ForwardedPortLocal.NET.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ForwardedPortRemote.cs">
+      <Link>ForwardedPortRemote.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ForwardedPortRemote.NET.cs">
+      <Link>ForwardedPortRemote.NET.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\HashInfo.cs">
+      <Link>HashInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\IAuthenticationMethod.cs">
+      <Link>IAuthenticationMethod.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\IClientAuthentication.cs">
+      <Link>IClientAuthentication.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\IConnectionInfo.cs">
+      <Link>IConnectionInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\IForwardedPort.cs">
+      <Link>IForwardedPort.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\IServiceFactory.cs">
+      <Link>IServiceFactory.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\IServiceFactory.NET.cs">
+      <Link>IServiceFactory.NET.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ISession.cs">
+      <Link>ISession.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ISubsystemSession.cs">
+      <Link>ISubsystemSession.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\KeyboardInteractiveAuthenticationMethod.cs">
+      <Link>KeyboardInteractiveAuthenticationMethod.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\KeyboardInteractiveConnectionInfo.cs">
+      <Link>KeyboardInteractiveConnectionInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\MessageEventArgs.cs">
+      <Link>MessageEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\BannerMessage.cs">
+      <Link>Messages\Authentication\BannerMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\FailureMessage.cs">
+      <Link>Messages\Authentication\FailureMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\InformationRequestMessage.cs">
+      <Link>Messages\Authentication\InformationRequestMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\InformationResponseMessage.cs">
+      <Link>Messages\Authentication\InformationResponseMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\PasswordChangeRequiredMessage.cs">
+      <Link>Messages\Authentication\PasswordChangeRequiredMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\PublicKeyMessage.cs">
+      <Link>Messages\Authentication\PublicKeyMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\RequestMessage.cs">
+      <Link>Messages\Authentication\RequestMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\RequestMessageHost.cs">
+      <Link>Messages\Authentication\RequestMessageHost.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\RequestMessageKeyboardInteractive.cs">
+      <Link>Messages\Authentication\RequestMessageKeyboardInteractive.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\RequestMessageNone.cs">
+      <Link>Messages\Authentication\RequestMessageNone.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\RequestMessagePassword.cs">
+      <Link>Messages\Authentication\RequestMessagePassword.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\RequestMessagePublicKey.cs">
+      <Link>Messages\Authentication\RequestMessagePublicKey.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\SuccessMessage.cs">
+      <Link>Messages\Authentication\SuccessMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelCloseMessage.cs">
+      <Link>Messages\Connection\ChannelCloseMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelDataMessage.cs">
+      <Link>Messages\Connection\ChannelDataMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelEofMessage.cs">
+      <Link>Messages\Connection\ChannelEofMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelExtendedDataMessage.cs">
+      <Link>Messages\Connection\ChannelExtendedDataMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelFailureMessage.cs">
+      <Link>Messages\Connection\ChannelFailureMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelMessage.cs">
+      <Link>Messages\Connection\ChannelMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpenConfirmationMessage.cs">
+      <Link>Messages\Connection\ChannelOpenConfirmationMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpenFailureMessage.cs">
+      <Link>Messages\Connection\ChannelOpenFailureMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpenFailureReasons.cs">
+      <Link>Messages\Connection\ChannelOpenFailureReasons.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpen\ChannelOpenInfo.cs">
+      <Link>Messages\Connection\ChannelOpen\ChannelOpenInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpen\ChannelOpenMessage.cs">
+      <Link>Messages\Connection\ChannelOpen\ChannelOpenMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpen\DirectTcpipChannelInfo.cs">
+      <Link>Messages\Connection\ChannelOpen\DirectTcpipChannelInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpen\ForwardedTcpipChannelInfo.cs">
+      <Link>Messages\Connection\ChannelOpen\ForwardedTcpipChannelInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpen\SessionChannelOpenInfo.cs">
+      <Link>Messages\Connection\ChannelOpen\SessionChannelOpenInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpen\X11ChannelOpenInfo.cs">
+      <Link>Messages\Connection\ChannelOpen\X11ChannelOpenInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\BreakRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\BreakRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\ChannelRequestMessage.cs">
+      <Link>Messages\Connection\ChannelRequest\ChannelRequestMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\EndOfWriteRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\EndOfWriteRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\EnvironmentVariableRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\EnvironmentVariableRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\ExecRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\ExecRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\ExitSignalRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\ExitSignalRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\ExitStatusRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\ExitStatusRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\KeepAliveRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\KeepAliveRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\PseudoTerminalInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\PseudoTerminalInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\RequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\RequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\ShellRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\ShellRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\SignalRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\SignalRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\SubsystemRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\SubsystemRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\WindowChangeRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\WindowChangeRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\X11ForwardingRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\X11ForwardingRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\XonXoffRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\XonXoffRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelSuccessMessage.cs">
+      <Link>Messages\Connection\ChannelSuccessMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelWindowAdjustMessage.cs">
+      <Link>Messages\Connection\ChannelWindowAdjustMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\GlobalRequestMessage.cs">
+      <Link>Messages\Connection\GlobalRequestMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\GlobalRequestName.cs">
+      <Link>Messages\Connection\GlobalRequestName.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\RequestFailureMessage.cs">
+      <Link>Messages\Connection\RequestFailureMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\RequestSuccessMessage.cs">
+      <Link>Messages\Connection\RequestSuccessMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Message.cs">
+      <Link>Messages\Message.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\MessageAttribute.cs">
+      <Link>Messages\MessageAttribute.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\ServiceName.cs">
+      <Link>Messages\ServiceName.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\DebugMessage.cs">
+      <Link>Messages\Transport\DebugMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\DisconnectMessage.cs">
+      <Link>Messages\Transport\DisconnectMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\DisconnectReason.cs">
+      <Link>Messages\Transport\DisconnectReason.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\IgnoreMessage.cs">
+      <Link>Messages\Transport\IgnoreMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\IKeyExchangedAllowed.cs">
+      <Link>Messages\Transport\IKeyExchangedAllowed.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeDhGroupExchangeGroup.cs">
+      <Link>Messages\Transport\KeyExchangeDhGroupExchangeGroup.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeDhGroupExchangeInit.cs">
+      <Link>Messages\Transport\KeyExchangeDhGroupExchangeInit.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeDhGroupExchangeReply.cs">
+      <Link>Messages\Transport\KeyExchangeDhGroupExchangeReply.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeDhGroupExchangeRequest.cs">
+      <Link>Messages\Transport\KeyExchangeDhGroupExchangeRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeDhInitMessage.cs">
+      <Link>Messages\Transport\KeyExchangeDhInitMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeDhReplyMessage.cs">
+      <Link>Messages\Transport\KeyExchangeDhReplyMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeEcdhInitMessage.cs">
+      <Link>Messages\Transport\KeyExchangeEcdhInitMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeEcdhReplyMessage.cs">
+      <Link>Messages\Transport\KeyExchangeEcdhReplyMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeInitMessage.cs">
+      <Link>Messages\Transport\KeyExchangeInitMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\NewKeysMessage.cs">
+      <Link>Messages\Transport\NewKeysMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\ServiceAcceptMessage.cs">
+      <Link>Messages\Transport\ServiceAcceptMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\ServiceRequestMessage.cs">
+      <Link>Messages\Transport\ServiceRequestMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\UnimplementedMessage.cs">
+      <Link>Messages\Transport\UnimplementedMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\NetConfClient.cs">
+      <Link>NetConfClient.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Netconf\INetConfSession.cs">
+      <Link>Netconf\INetConfSession.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Netconf\NetConfSession.cs">
+      <Link>Netconf\NetConfSession.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\NoneAuthenticationMethod.cs">
+      <Link>NoneAuthenticationMethod.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\PasswordAuthenticationMethod.cs">
+      <Link>PasswordAuthenticationMethod.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\PasswordConnectionInfo.cs">
+      <Link>PasswordConnectionInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\PrivateKeyAuthenticationMethod.cs">
+      <Link>PrivateKeyAuthenticationMethod.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\PrivateKeyConnectionInfo.cs">
+      <Link>PrivateKeyConnectionInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\PrivateKeyFile.cs">
+      <Link>PrivateKeyFile.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Properties\CommonAssemblyInfo.cs">
+      <Link>Properties\CommonAssemblyInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ProxyTypes.cs">
+      <Link>ProxyTypes.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ScpClient.cs">
+      <Link>ScpClient.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ScpClient.NET.cs">
+      <Link>ScpClient.NET.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Algorithm.cs">
+      <Link>Security\Algorithm.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\CertificateHostAlgorithm.cs">
+      <Link>Security\CertificateHostAlgorithm.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\AsymmetricCipher.cs">
+      <Link>Security\Cryptography\AsymmetricCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\BlockCipher.cs">
+      <Link>Security\Cryptography\BlockCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Cipher.cs">
+      <Link>Security\Cryptography\Cipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\CipherDigitalSignature.cs">
+      <Link>Security\Cryptography\CipherDigitalSignature.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\AesCipher.cs">
+      <Link>Security\Cryptography\Ciphers\AesCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\Arc4Cipher.cs">
+      <Link>Security\Cryptography\Ciphers\Arc4Cipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\BlowfishCipher.cs">
+      <Link>Security\Cryptography\Ciphers\BlowfishCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\CastCipher.cs">
+      <Link>Security\Cryptography\Ciphers\CastCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\CipherMode.cs">
+      <Link>Security\Cryptography\Ciphers\CipherMode.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\CipherPadding.cs">
+      <Link>Security\Cryptography\Ciphers\CipherPadding.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\DesCipher.cs">
+      <Link>Security\Cryptography\Ciphers\DesCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\Modes\CbcCipherMode.cs">
+      <Link>Security\Cryptography\Ciphers\Modes\CbcCipherMode.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\Modes\CfbCipherMode.cs">
+      <Link>Security\Cryptography\Ciphers\Modes\CfbCipherMode.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\Modes\CtrCipherMode.cs">
+      <Link>Security\Cryptography\Ciphers\Modes\CtrCipherMode.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\Modes\OfbCipherMode.cs">
+      <Link>Security\Cryptography\Ciphers\Modes\OfbCipherMode.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\Paddings\PKCS5Padding.cs">
+      <Link>Security\Cryptography\Ciphers\Paddings\PKCS5Padding.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\Paddings\PKCS7Padding.cs">
+      <Link>Security\Cryptography\Ciphers\Paddings\PKCS7Padding.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\RsaCipher.cs">
+      <Link>Security\Cryptography\Ciphers\RsaCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\SerpentCipher.cs">
+      <Link>Security\Cryptography\Ciphers\SerpentCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\TripleDesCipher.cs">
+      <Link>Security\Cryptography\Ciphers\TripleDesCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\TwofishCipher.cs">
+      <Link>Security\Cryptography\Ciphers\TwofishCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\DigitalSignature.cs">
+      <Link>Security\Cryptography\DigitalSignature.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\DsaDigitalSignature.cs">
+      <Link>Security\Cryptography\DsaDigitalSignature.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\DsaKey.cs">
+      <Link>Security\Cryptography\DsaKey.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\HashAlgorithmFactory.cs">
+      <Link>Security\Cryptography\HashAlgorithmFactory.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\HMACMD5.cs">
+      <Link>Security\Cryptography\HMACMD5.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\HMACSHA1.cs">
+      <Link>Security\Cryptography\HMACSHA1.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\HMACSHA256.cs">
+      <Link>Security\Cryptography\HMACSHA256.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\HMACSHA384.cs">
+      <Link>Security\Cryptography\HMACSHA384.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\HMACSHA512.cs">
+      <Link>Security\Cryptography\HMACSHA512.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Key.cs">
+      <Link>Security\Cryptography\Key.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\RsaDigitalSignature.cs">
+      <Link>Security\Cryptography\RsaDigitalSignature.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\RsaKey.cs">
+      <Link>Security\Cryptography\RsaKey.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\StreamCipher.cs">
+      <Link>Security\Cryptography\StreamCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\SymmetricCipher.cs">
+      <Link>Security\Cryptography\SymmetricCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\GroupExchangeHashData.cs">
+      <Link>Security\GroupExchangeHashData.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\HostAlgorithm.cs">
+      <Link>Security\HostAlgorithm.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\IKeyExchange.cs">
+      <Link>Security\IKeyExchange.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\KeyExchange.cs">
+      <Link>Security\KeyExchange.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\KeyExchangeDiffieHellman.cs">
+      <Link>Security\KeyExchangeDiffieHellman.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\KeyExchangeDiffieHellmanGroup14Sha1.cs">
+      <Link>Security\KeyExchangeDiffieHellmanGroup14Sha1.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\KeyExchangeDiffieHellmanGroup1Sha1.cs">
+      <Link>Security\KeyExchangeDiffieHellmanGroup1Sha1.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\KeyExchangeDiffieHellmanGroupExchangeSha1.cs">
+      <Link>Security\KeyExchangeDiffieHellmanGroupExchangeSha1.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\KeyExchangeDiffieHellmanGroupExchangeSha256.cs">
+      <Link>Security\KeyExchangeDiffieHellmanGroupExchangeSha256.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\KeyExchangeDiffieHellmanGroupExchangeShaBase.cs">
+      <Link>Security\KeyExchangeDiffieHellmanGroupExchangeShaBase.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\KeyExchangeDiffieHellmanGroupSha1.cs">
+      <Link>Security\KeyExchangeDiffieHellmanGroupSha1.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\KeyExchangeEllipticCurveDiffieHellman.cs">
+      <Link>Security\KeyExchangeEllipticCurveDiffieHellman.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\KeyHostAlgorithm.cs">
+      <Link>Security\KeyHostAlgorithm.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ServiceFactory.cs">
+      <Link>ServiceFactory.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ServiceFactory.NET.cs">
+      <Link>ServiceFactory.NET.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Session.cs">
+      <Link>Session.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Session.NET.cs">
+      <Link>Session.NET.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Session.NET40.cs">
+      <Link>Session.NET40.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\SftpClient.cs">
+      <Link>SftpClient.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\SftpClient.NET.cs">
+      <Link>SftpClient.NET.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Flags.cs">
+      <Link>Sftp\Flags.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\ISftpSession.cs">
+      <Link>Sftp\ISftpSession.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\ExtendedRequests\FStatVfsRequest.cs">
+      <Link>Sftp\Requests\ExtendedRequests\FStatVfsRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\ExtendedRequests\HardLinkRequest.cs">
+      <Link>Sftp\Requests\ExtendedRequests\HardLinkRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\ExtendedRequests\PosixRenameRequest.cs">
+      <Link>Sftp\Requests\ExtendedRequests\PosixRenameRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\ExtendedRequests\StatVfsRequest.cs">
+      <Link>Sftp\Requests\ExtendedRequests\StatVfsRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpBlockRequest.cs">
+      <Link>Sftp\Requests\SftpBlockRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpCloseRequest.cs">
+      <Link>Sftp\Requests\SftpCloseRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpExtendedRequest.cs">
+      <Link>Sftp\Requests\SftpExtendedRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpFSetStatRequest.cs">
+      <Link>Sftp\Requests\SftpFSetStatRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpFStatRequest.cs">
+      <Link>Sftp\Requests\SftpFStatRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpInitRequest.cs">
+      <Link>Sftp\Requests\SftpInitRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpLinkRequest.cs">
+      <Link>Sftp\Requests\SftpLinkRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpLStatRequest.cs">
+      <Link>Sftp\Requests\SftpLStatRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpMkDirRequest.cs">
+      <Link>Sftp\Requests\SftpMkDirRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpOpenDirRequest.cs">
+      <Link>Sftp\Requests\SftpOpenDirRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpOpenRequest.cs">
+      <Link>Sftp\Requests\SftpOpenRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpReadDirRequest.cs">
+      <Link>Sftp\Requests\SftpReadDirRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpReadLinkRequest.cs">
+      <Link>Sftp\Requests\SftpReadLinkRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpReadRequest.cs">
+      <Link>Sftp\Requests\SftpReadRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpRealPathRequest.cs">
+      <Link>Sftp\Requests\SftpRealPathRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpRemoveRequest.cs">
+      <Link>Sftp\Requests\SftpRemoveRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpRenameRequest.cs">
+      <Link>Sftp\Requests\SftpRenameRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpRequest.cs">
+      <Link>Sftp\Requests\SftpRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpRmDirRequest.cs">
+      <Link>Sftp\Requests\SftpRmDirRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpSetStatRequest.cs">
+      <Link>Sftp\Requests\SftpSetStatRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpStatRequest.cs">
+      <Link>Sftp\Requests\SftpStatRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpSymLinkRequest.cs">
+      <Link>Sftp\Requests\SftpSymLinkRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpUnblockRequest.cs">
+      <Link>Sftp\Requests\SftpUnblockRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpWriteRequest.cs">
+      <Link>Sftp\Requests\SftpWriteRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Responses\ExtendedReplies\ExtendedReplyInfo.cs">
+      <Link>Sftp\Responses\ExtendedReplies\ExtendedReplyInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Responses\ExtendedReplies\StatVfsReplyInfo.cs">
+      <Link>Sftp\Responses\ExtendedReplies\StatVfsReplyInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpAttrsResponse.cs">
+      <Link>Sftp\Responses\SftpAttrsResponse.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpDataResponse.cs">
+      <Link>Sftp\Responses\SftpDataResponse.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpExtendedReplyResponse.cs">
+      <Link>Sftp\Responses\SftpExtendedReplyResponse.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpHandleResponse.cs">
+      <Link>Sftp\Responses\SftpHandleResponse.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpNameResponse.cs">
+      <Link>Sftp\Responses\SftpNameResponse.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpResponse.cs">
+      <Link>Sftp\Responses\SftpResponse.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpStatusResponse.cs">
+      <Link>Sftp\Responses\SftpStatusResponse.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpVersionResponse.cs">
+      <Link>Sftp\Responses\SftpVersionResponse.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Responses\StatVfsResponse.cs">
+      <Link>Sftp\Responses\StatVfsResponse.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\SftpDownloadAsyncResult.cs">
+      <Link>Sftp\SftpDownloadAsyncResult.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\SftpFile.cs">
+      <Link>Sftp\SftpFile.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\SftpFileAttributes.cs">
+      <Link>Sftp\SftpFileAttributes.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\SftpFileStream.cs">
+      <Link>Sftp\SftpFileStream.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\SftpFileSystemInformation.cs">
+      <Link>Sftp\SftpFileSystemInformation.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\SftpListDirectoryAsyncResult.cs">
+      <Link>Sftp\SftpListDirectoryAsyncResult.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\SftpMessage.cs">
+      <Link>Sftp\SftpMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\SftpMessageTypes.cs">
+      <Link>Sftp\SftpMessageTypes.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\SftpSession.cs">
+      <Link>Sftp\SftpSession.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\SftpSynchronizeDirectoriesAsyncResult.cs">
+      <Link>Sftp\SftpSynchronizeDirectoriesAsyncResult.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\SftpUploadAsyncResult.cs">
+      <Link>Sftp\SftpUploadAsyncResult.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\StatusCodes.cs">
+      <Link>Sftp\StatusCodes.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Shell.cs">
+      <Link>Shell.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ShellStream.cs">
+      <Link>ShellStream.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\SshClient.cs">
+      <Link>SshClient.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\SshCommand.cs">
+      <Link>SshCommand.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\SubsystemSession.cs">
+      <Link>SubsystemSession.cs</Link>
+    </Compile>
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <EmbeddedResource Include="Properties\Renci.SshNet.UAP10.rd.xml" />
+  </ItemGroup>
+  <PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
+    <VisualStudioVersion>14.0</VisualStudioVersion>
+  </PropertyGroup>
+  <Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>

+ 18 - 0
src/Renci.SshNet.UAP10/project.json

@@ -0,0 +1,18 @@
+{
+  "dependencies": {
+    "Microsoft.NETCore.UniversalWindowsPlatform": "5.2.0-rc3-23931-00",
+    "Renci.Security.Cryptography": "1.0.0",
+    "System.Xml.XPath.XmlDocument": "4.0.1-rc3-23931-00"
+  },
+  "frameworks": {
+    "uap10.0": { }
+  },
+  "runtimes": {
+    "win10-arm": {},
+    "win10-arm-aot": {},
+    "win10-x86": {},
+    "win10-x86-aot": {},
+    "win10-x64": {},
+    "win10-x64-aot": {}
+  }
+}

+ 51 - 1
src/Renci.SshNet.VS2015.sln

@@ -1,7 +1,7 @@
 
 Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio 14
-VisualStudioVersion = 14.0.24720.0
+VisualStudioVersion = 14.0.25029.0
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A3063E62-89D5-43FF-AB1A-FFBECB4A1850}"
 	ProjectSection(SolutionItems) = preProject
@@ -51,6 +51,10 @@ Project("{911E67C6-3D85-4FCE-B560-20A9C3E3FF48}") = "nuget", "Build\nuget\nuget.
 		AttachLaunchAction = No
 	EndProjectSection
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Renci.SshNet.UAP10", "Renci.SshNet.UAP10\Renci.SshNet.UAP10.csproj", "{EC212E04-A372-4B95-B45B-C0D4A739EF80}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "App1", "App1\App1.csproj", "{6290900F-5110-44AE-A8A8-92CC8E57A78D}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -159,6 +163,52 @@ Global
 		{8BE48567-6BDA-43D7-811D-9C30CCB3B7F2}.Release|Mixed Platforms.ActiveCfg = Release
 		{8BE48567-6BDA-43D7-811D-9C30CCB3B7F2}.Release|x64.ActiveCfg = Release
 		{8BE48567-6BDA-43D7-811D-9C30CCB3B7F2}.Release|x86.ActiveCfg = Release
+		{EC212E04-A372-4B95-B45B-C0D4A739EF80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{EC212E04-A372-4B95-B45B-C0D4A739EF80}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{EC212E04-A372-4B95-B45B-C0D4A739EF80}.Debug|ARM.ActiveCfg = Debug|ARM
+		{EC212E04-A372-4B95-B45B-C0D4A739EF80}.Debug|ARM.Build.0 = Debug|ARM
+		{EC212E04-A372-4B95-B45B-C0D4A739EF80}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+		{EC212E04-A372-4B95-B45B-C0D4A739EF80}.Debug|Mixed Platforms.Build.0 = Debug|x86
+		{EC212E04-A372-4B95-B45B-C0D4A739EF80}.Debug|x64.ActiveCfg = Debug|x64
+		{EC212E04-A372-4B95-B45B-C0D4A739EF80}.Debug|x64.Build.0 = Debug|x64
+		{EC212E04-A372-4B95-B45B-C0D4A739EF80}.Debug|x86.ActiveCfg = Debug|x86
+		{EC212E04-A372-4B95-B45B-C0D4A739EF80}.Debug|x86.Build.0 = Debug|x86
+		{EC212E04-A372-4B95-B45B-C0D4A739EF80}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{EC212E04-A372-4B95-B45B-C0D4A739EF80}.Release|Any CPU.Build.0 = Release|Any CPU
+		{EC212E04-A372-4B95-B45B-C0D4A739EF80}.Release|ARM.ActiveCfg = Release|ARM
+		{EC212E04-A372-4B95-B45B-C0D4A739EF80}.Release|ARM.Build.0 = Release|ARM
+		{EC212E04-A372-4B95-B45B-C0D4A739EF80}.Release|Mixed Platforms.ActiveCfg = Release|x86
+		{EC212E04-A372-4B95-B45B-C0D4A739EF80}.Release|Mixed Platforms.Build.0 = Release|x86
+		{EC212E04-A372-4B95-B45B-C0D4A739EF80}.Release|x64.ActiveCfg = Release|x64
+		{EC212E04-A372-4B95-B45B-C0D4A739EF80}.Release|x64.Build.0 = Release|x64
+		{EC212E04-A372-4B95-B45B-C0D4A739EF80}.Release|x86.ActiveCfg = Release|x86
+		{EC212E04-A372-4B95-B45B-C0D4A739EF80}.Release|x86.Build.0 = Release|x86
+		{6290900F-5110-44AE-A8A8-92CC8E57A78D}.Debug|Any CPU.ActiveCfg = Debug|x86
+		{6290900F-5110-44AE-A8A8-92CC8E57A78D}.Debug|ARM.ActiveCfg = Debug|ARM
+		{6290900F-5110-44AE-A8A8-92CC8E57A78D}.Debug|ARM.Build.0 = Debug|ARM
+		{6290900F-5110-44AE-A8A8-92CC8E57A78D}.Debug|ARM.Deploy.0 = Debug|ARM
+		{6290900F-5110-44AE-A8A8-92CC8E57A78D}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+		{6290900F-5110-44AE-A8A8-92CC8E57A78D}.Debug|Mixed Platforms.Build.0 = Debug|x86
+		{6290900F-5110-44AE-A8A8-92CC8E57A78D}.Debug|Mixed Platforms.Deploy.0 = Debug|x86
+		{6290900F-5110-44AE-A8A8-92CC8E57A78D}.Debug|x64.ActiveCfg = Debug|x64
+		{6290900F-5110-44AE-A8A8-92CC8E57A78D}.Debug|x64.Build.0 = Debug|x64
+		{6290900F-5110-44AE-A8A8-92CC8E57A78D}.Debug|x64.Deploy.0 = Debug|x64
+		{6290900F-5110-44AE-A8A8-92CC8E57A78D}.Debug|x86.ActiveCfg = Debug|x86
+		{6290900F-5110-44AE-A8A8-92CC8E57A78D}.Debug|x86.Build.0 = Debug|x86
+		{6290900F-5110-44AE-A8A8-92CC8E57A78D}.Debug|x86.Deploy.0 = Debug|x86
+		{6290900F-5110-44AE-A8A8-92CC8E57A78D}.Release|Any CPU.ActiveCfg = Release|x86
+		{6290900F-5110-44AE-A8A8-92CC8E57A78D}.Release|ARM.ActiveCfg = Release|ARM
+		{6290900F-5110-44AE-A8A8-92CC8E57A78D}.Release|ARM.Build.0 = Release|ARM
+		{6290900F-5110-44AE-A8A8-92CC8E57A78D}.Release|ARM.Deploy.0 = Release|ARM
+		{6290900F-5110-44AE-A8A8-92CC8E57A78D}.Release|Mixed Platforms.ActiveCfg = Release|x86
+		{6290900F-5110-44AE-A8A8-92CC8E57A78D}.Release|Mixed Platforms.Build.0 = Release|x86
+		{6290900F-5110-44AE-A8A8-92CC8E57A78D}.Release|Mixed Platforms.Deploy.0 = Release|x86
+		{6290900F-5110-44AE-A8A8-92CC8E57A78D}.Release|x64.ActiveCfg = Release|x64
+		{6290900F-5110-44AE-A8A8-92CC8E57A78D}.Release|x64.Build.0 = Release|x64
+		{6290900F-5110-44AE-A8A8-92CC8E57A78D}.Release|x64.Deploy.0 = Release|x64
+		{6290900F-5110-44AE-A8A8-92CC8E57A78D}.Release|x86.ActiveCfg = Release|x86
+		{6290900F-5110-44AE-A8A8-92CC8E57A78D}.Release|x86.Build.0 = Release|x86
+		{6290900F-5110-44AE-A8A8-92CC8E57A78D}.Release|x86.Deploy.0 = Release|x86
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

+ 2 - 0
src/Renci.SshNet.VS2015.sln.DotSettings

@@ -0,0 +1,2 @@
+<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
+	<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UnusedParameter_002ELocal/@EntryIndexedValue">WARNING</s:String></wpf:ResourceDictionary>

+ 8 - 20
src/Renci.SshNet.WindowsPhone8/Renci.SshNet.WindowsPhone8.csproj

@@ -23,7 +23,7 @@
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <OutputPath>Bin\Debug</OutputPath>
-    <DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE;TUNING;FEATURE_HASH_SHA1;FEATURE_HASH_SHA256;FEATURE_HMAC_SHA1;FEATURE_HMAC_SHA256</DefineConstants>
+    <DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE;TUNING;FEATURE_HASH_SHA1;FEATURE_HASH_SHA256;FEATURE_HMAC_SHA1;FEATURE_HMAC_SHA256;FEATURE_RNG_CRYPTO;FEATURE_THREAD_SLEEP;FEATURE_MEMORYSTREAM_GETBUFFER</DefineConstants>
     <NoStdLib>true</NoStdLib>
     <NoConfig>true</NoConfig>
     <ErrorReport>prompt</ErrorReport>
@@ -97,6 +97,12 @@
     <Compile Include="..\Renci.SshNet.WindowsPhone\Common\Extensions.WP.cs">
       <Link>Common\Extensions.WP.cs</Link>
     </Compile>
+    <Compile Include="..\Renci.SshNet\Abstractions\ReflectionAbstraction.cs">
+      <Link>Abstractions\ReflectionAbstraction.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Abstractions\ThreadAbstraction.cs">
+      <Link>Abstractions\ThreadAbstraction.cs</Link>
+    </Compile>
     <Compile Include="..\Renci.SshNet\AuthenticationMethod.cs">
       <Link>AuthenticationMethod.cs</Link>
     </Compile>
@@ -325,9 +331,6 @@
     <Compile Include="..\Renci.SshNet\KeyboardInteractiveAuthenticationMethod.cs">
       <Link>KeyboardInteractiveAuthenticationMethod.cs</Link>
     </Compile>
-    <Compile Include="..\Renci.SshNet.Silverlight\KeyboardInteractiveAuthenticationMethod.SilverlightShared.cs">
-      <Link>PasswordAuthenticationMethod.cs</Link>
-    </Compile>
     <Compile Include="..\Renci.SshNet\KeyboardInteractiveConnectionInfo.cs">
       <Link>KeyboardInteractiveConnectionInfo.cs</Link>
     </Compile>
@@ -553,9 +556,6 @@
     <Compile Include="..\Renci.SshNet\PasswordAuthenticationMethod.cs">
       <Link>PasswordAuthenticationMethod.cs</Link>
     </Compile>
-    <Compile Include="..\Renci.SshNet.Silverlight\PasswordAuthenticationMethod.SilverlightShared.cs">
-      <Link>PasswordAuthenticationMethod.cs</Link>
-    </Compile>
     <Compile Include="..\Renci.SshNet\PasswordConnectionInfo.cs">
       <Link>PasswordConnectionInfo.cs</Link>
     </Compile>
@@ -736,9 +736,6 @@
     <Compile Include="..\Renci.SshNet\SftpClient.cs">
       <Link>SftpClient.cs</Link>
     </Compile>
-    <Compile Include="..\Renci.SshNet.Silverlight\SftpClient.SilverlightShared.cs">
-      <Link>Session.cs</Link>
-    </Compile>
     <Compile Include="..\Renci.SshNet\Sftp\Flags.cs">
       <Link>Sftp\Flags.cs</Link>
     </Compile>
@@ -895,24 +892,15 @@
     <Compile Include="..\Renci.SshNet\Shell.cs">
       <Link>Shell.cs</Link>
     </Compile>
-    <Compile Include="..\Renci.SshNet.Silverlight\Shell.SilverlightShared.cs">
-      <Link>Shell.SilverlightShared.cs</Link>
-    </Compile>
     <Compile Include="..\Renci.SshNet\ShellStream.cs">
       <Link>ShellStream.cs</Link>
     </Compile>
-    <Compile Include="..\Renci.SshNet.Silverlight\ShellStream.SilverlightShared.cs">
-      <Link>ShellStream.SilverlightShared.cs</Link>
-    </Compile>
     <Compile Include="..\Renci.SshNet\SshClient.cs">
       <Link>SshClient.cs</Link>
     </Compile>
     <Compile Include="..\Renci.SshNet\SshCommand.cs">
       <Link>SshCommand.cs</Link>
     </Compile>
-    <Compile Include="..\Renci.SshNet.Silverlight\SshCommand.SilverlightShared.cs">
-      <Link>SshCommand.cs</Link>
-    </Compile>
     <Compile Include="..\Renci.SshNet\SubsystemSession.cs">
       <Link>SubsystemSession.cs</Link>
     </Compile>
@@ -936,7 +924,7 @@
   <Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" />
   <ProjectExtensions>
     <VisualStudio>
-      <UserProperties ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" />
+      <UserProperties ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" />
     </VisualStudio>
   </ProjectExtensions>
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 

+ 41 - 0
src/Renci.SshNet/Abstractions/DnsAbstraction.cs

@@ -0,0 +1,41 @@
+using System.Net;
+
+namespace Renci.SshNet.Abstractions
+{
+    internal static class DnsAbstraction
+    {
+        /// <summary>
+        /// Returns the Internet Protocol (IP) addresses for the specified host.
+        /// </summary>
+        /// <param name="hostNameOrAddress">The host name or IP address to resolve</param>
+        /// <returns>
+        /// An array of type <see cref="IPAddress"/> that holds the IP addresses for the host that
+        /// is specified by the <paramref name="hostNameOrAddress"/> parameter.
+        /// </returns>
+        public static IPAddress[] GetHostAddresses(string hostNameOrAddress)
+        {
+#if FEATURE_DNS_ASYNC
+            return Dns.GetHostAddressesAsync(hostNameOrAddress).Result;
+#else
+            return Dns.GetHostAddresses(hostNameOrAddress);
+#endif
+        }
+
+        /// <summary>
+        /// Resolves a host name or IP address to an <see cref="IPHostEntry"/> instance.
+        /// </summary>
+        /// <param name="hostNameOrAddress">The host name or IP address to resolve.</param>
+        /// <returns>
+        /// An <see cref="IPHostEntry"/> instance that contains address information about the host
+        /// specified in <paramref name="hostNameOrAddress"/>.
+        /// </returns>
+        public static IPHostEntry GetHostEntry(string hostNameOrAddress)
+        {
+#if FEATURE_DNS_ASYNC
+            return Dns.GetHostEntryAsync(hostNameOrAddress).Result;
+#else
+            return Dns.GetHostEntry(hostNameOrAddress);
+#endif
+        }
+    }
+}

+ 21 - 0
src/Renci.SshNet/Abstractions/ReflectionAbstraction.cs

@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+
+namespace Renci.SshNet.Abstractions
+{
+    internal static class ReflectionAbstraction
+    {
+        public static IEnumerable<T> GetCustomAttributes<T>(this Type type, bool inherit)
+            where T:Attribute
+        {
+#if FEATURE_REFLECTION_TYPEINFO
+            return type.GetTypeInfo().GetCustomAttributes<T>(inherit);
+#else
+            var attributes = type.GetCustomAttributes(typeof(T), inherit);
+            return new List<T>(attributes.Cast<T>());
+#endif
+        }
+    }
+}

+ 35 - 0
src/Renci.SshNet/Abstractions/ThreadAbstraction.cs

@@ -0,0 +1,35 @@
+using System;
+
+namespace Renci.SshNet.Abstractions
+{
+    internal static class ThreadAbstraction
+    {
+        /// <summary>
+        /// Suspends the current thread for the specified number of milliseconds.
+        /// </summary>
+        /// <param name="millisecondsTimeout">The number of milliseconds for which the thread is suspended.</param>
+        public static void Sleep(int millisecondsTimeout)
+        {
+#if FEATURE_THREAD_SLEEP
+            System.Threading.Thread.Sleep(millisecondsTimeout);
+#elif FEATURE_TPL
+            System.Threading.Tasks.Task.Delay(millisecondsTimeout).Wait();
+#else
+#error Suspend of the current thread is not implemented.
+#endif
+        }
+
+        /// <summary>
+        /// Executes the specified action in a separate thread.
+        /// </summary>
+        /// <param name="action">The action to execute.</param>
+        public static void ExecuteThread(Action action)
+        {
+#if FEATURE_TPL
+            System.Threading.Tasks.Task.Run(action);
+#else
+            System.Threading.ThreadPool.QueueUserWorkItem(o => action());
+#endif
+        }
+    }
+}

+ 6 - 7
src/Renci.SshNet/BaseClient.cs

@@ -379,10 +379,7 @@ namespace Renci.SshNet
             if (_keepAliveTimer == null)
                 return;
 
-            var timerDisposed = new ManualResetEvent(false);
-            _keepAliveTimer.Dispose(timerDisposed);
-            timerDisposed.WaitOne();
-            timerDisposed.Dispose();
+            _keepAliveTimer.Dispose();
             _keepAliveTimer = null;
         }
 
@@ -418,9 +415,11 @@ namespace Renci.SshNet
             if (_keepAliveInterval == SshNet.Session.InfiniteTimeSpan)
                 return;
 
-            if (_keepAliveTimer == null)
-                _keepAliveTimer = new Timer(state => SendKeepAliveMessage());
-            _keepAliveTimer.Change(_keepAliveInterval, _keepAliveInterval);
+            if (_keepAliveTimer != null)
+                // timer is already started
+                return;
+
+            _keepAliveTimer = new Timer(state => SendKeepAliveMessage(), null, _keepAliveInterval, _keepAliveInterval);
         }
     }
 }

+ 3 - 3
src/Renci.SshNet/Channels/ChannelDirectTcpip.cs

@@ -1,8 +1,8 @@
 using System;
-using System.Linq;
 using System.Net;
 using System.Net.Sockets;
 using System.Threading;
+using Renci.SshNet.Abstractions;
 using Renci.SshNet.Common;
 using Renci.SshNet.Messages.Connection;
 
@@ -115,7 +115,7 @@ namespace Renci.SshNet.Channels
                         case SocketError.IOPending:
                         case SocketError.NoBufferSpaceAvailable:
                             // socket buffer is probably empty, wait and try again
-                            Thread.Sleep(30);
+                            ThreadAbstraction.Sleep(30);
                             break;
                         case SocketError.ConnectionAborted:
                         case SocketError.ConnectionReset:
@@ -154,7 +154,7 @@ namespace Renci.SshNet.Channels
 
                 // closing a socket actually disposes the socket, so we can safely dereference
                 // the field to avoid entering the lock again later
-                _socket.Close();
+                _socket.Dispose();
                 _socket = null;
             }
         }

+ 3 - 4
src/Renci.SshNet/Channels/ChannelForwardedTcpip.cs

@@ -1,8 +1,7 @@
 using System;
-using System.Linq;
 using System.Net;
 using System.Net.Sockets;
-using System.Threading;
+using Renci.SshNet.Abstractions;
 using Renci.SshNet.Common;
 using Renci.SshNet.Messages.Connection;
 
@@ -108,7 +107,7 @@ namespace Renci.SshNet.Channels
                         exp.SocketErrorCode == SocketError.NoBufferSpaceAvailable)
                     {
                         // socket buffer is probably empty, wait and try again
-                        Thread.Sleep(30);
+                        ThreadAbstraction.Sleep(30);
                     }
                     else if (exp.SocketErrorCode == SocketError.ConnectionAborted || exp.SocketErrorCode == SocketError.Interrupted)
                     {
@@ -178,7 +177,7 @@ namespace Renci.SshNet.Channels
 
                 // closing a socket actually disposes the socket, so we can safely dereference
                 // the field to avoid entering the lock again later
-                _socket.Close();
+                _socket.Dispose();
                 _socket = null;
             }
         }

+ 2 - 1
src/Renci.SshNet/Channels/ChannelSession.cs

@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using System.Globalization;
 using System.Threading;
+using Renci.SshNet.Abstractions;
 using Renci.SshNet.Common;
 using Renci.SshNet.Messages.Connection;
 
@@ -121,7 +122,7 @@ namespace Renci.SshNet.Channels
 
             //  This timeout needed since when channel is closed it does not immediately becomes available
             //  but it takes time for the server to clean up resource and allow new channels to be created.
-            Thread.Sleep(100);
+            ThreadAbstraction.Sleep(100);
         }
 
         protected override void Close(bool wait)

+ 2 - 2
src/Renci.SshNet/Common/AsyncResult.cs

@@ -82,7 +82,7 @@ namespace Renci.SshNet.Common
             {
                 // If the operation isn't done, wait for it
                 AsyncWaitHandle.WaitOne();
-                AsyncWaitHandle.Close();
+                AsyncWaitHandle.Dispose();
                 _asyncWaitHandle = null;  // Allow early GC
             }
 
@@ -125,7 +125,7 @@ namespace Renci.SshNet.Common
                     if (Interlocked.CompareExchange(ref _asyncWaitHandle, mre, null) != null)
                     {
                         // Another thread created this object's event; dispose the event we just created
-                        mre.Close();
+                        mre.Dispose();
                     }
                     else
                     {

+ 2 - 1
src/Renci.SshNet/Common/BigInteger.cs

@@ -48,6 +48,7 @@ using System.Linq;
 using System.Collections.Generic;
 using System.Globalization;
 using System.Security.Cryptography;
+using Renci.SshNet.Security.Cryptography;
 
 /*
 Optimization
@@ -66,7 +67,7 @@ namespace Renci.SshNet.Common
     /// </summary>
     public struct BigInteger : IComparable, IFormattable, IComparable<BigInteger>, IEquatable<BigInteger>
     {
-        private static readonly RNGCryptoServiceProvider _randomizer = new RNGCryptoServiceProvider();
+        private static readonly RandomNumberGenerator _randomizer = HashAlgorithmFactory.CreateRandomNumberGenerator();
 
         private const ulong _BASE = 0x100000000;
         private const Int32 _DECIMALSIGNMASK = unchecked((Int32)0x80000000);

+ 2 - 1
src/Renci.SshNet/Common/Extensions.NET.cs

@@ -1,6 +1,7 @@
 using System.Linq;
 using System.Net;
 using System.Net.Sockets;
+using Renci.SshNet.Abstractions;
 
 namespace Renci.SshNet.Common
 {
@@ -37,7 +38,7 @@ namespace Renci.SshNet.Common
         {
             IPAddress ipAddress;
             if (!IPAddress.TryParse(host, out ipAddress))
-                ipAddress = Dns.GetHostAddresses(host).First();
+                ipAddress = DnsAbstraction.GetHostAddresses(host).First();
 
             return ipAddress;
         }

+ 0 - 4
src/Renci.SshNet/Common/Extensions.NET40.cs

@@ -1,8 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
 using System.Net.Sockets;
-using System.Text;
 
 namespace Renci.SshNet
 {

+ 2 - 1
src/Renci.SshNet/Common/Extensions.cs

@@ -76,6 +76,7 @@ namespace Renci.SshNet.Common
             Buffer.BlockCopy(data, 0, reversed, 0, data.Length);
             return new BigInteger(reversed.Reverse());
         }
+#endif
 
         /// <summary>
         /// Reverses the sequence of the elements in the entire one-dimensional <see cref="Array"/>.
@@ -89,7 +90,7 @@ namespace Renci.SshNet.Common
             Array.Reverse(array);
             return array;
         }
-#endif
+
 
         /// <summary>
         /// Checks whether a collection is the same as another collection

+ 31 - 19
src/Renci.SshNet/Common/SshData.cs

@@ -16,12 +16,7 @@ namespace Renci.SshNet.Common
         internal const int DefaultCapacity = 64;
 
         internal static readonly Encoding Ascii = new ASCIIEncoding();
-
-#if SILVERLIGHT
         internal static readonly Encoding Utf8 = Encoding.UTF8;
-#else
-        internal static readonly Encoding Utf8 = Encoding.Default;
-#endif
 
 #if TUNING
         private SshDataStream _stream;
@@ -233,6 +228,19 @@ namespace Renci.SshNet.Common
 #endif
         }
 
+#if !TUNING
+        /// <summary>
+        /// Reads next mpint data type from internal buffer.
+        /// </summary>
+        /// <returns>mpint read.</returns>
+        protected BigInteger ReadBigInt()
+        {
+            var length = this.ReadUInt32();
+            var data = this.ReadBytes((int)length);
+            return new BigInteger(data.Reverse().ToArray());
+        }
+#endif
+
         /// <summary>
         /// Reads all data left in internal buffer at current position.
         /// </summary>
@@ -355,18 +363,11 @@ namespace Renci.SshNet.Common
 #endif
 
         /// <summary>
-        /// Reads next string data type from internal buffer.
+        /// Reads next string data type from internal buffer using the specific encoding.
         /// </summary>
-        /// <returns>string read</returns>
-        protected string ReadString()
-        {
-            return ReadString(Utf8);
-        }
-
-        /// <summary>
-        /// Reads next string data type from internal buffer.
-        /// </summary>
-        /// <returns>string read</returns>
+        /// <returns>
+        /// The <see cref="string"/> read.
+        /// </returns>
         protected string ReadString(Encoding encoding)
         {
 #if TUNING
@@ -417,7 +418,7 @@ namespace Renci.SshNet.Common
         /// <returns>String array or read data..</returns>
         protected string[] ReadNamesList()
         {
-            var namesList = ReadString();
+            var namesList = ReadString(Ascii);
             return namesList.Split(',');
         }
 
@@ -430,8 +431,8 @@ namespace Renci.SshNet.Common
             var result = new Dictionary<string, string>();
             while (!IsEndOfData)
             {
-                var extensionName = ReadString();
-                var extensionData = ReadString();
+                var extensionName = ReadString(Ascii);
+                var extensionData = ReadString(Ascii);
                 result.Add(extensionName, extensionData);
             }
             return result;
@@ -524,6 +525,17 @@ namespace Renci.SshNet.Common
 #endif
         }
 
+#if !TUNING
+        /// <summary>
+        ///  Writes  string  data  into  internal  buffer  as  ASCII.
+        /// </summary>
+        /// <param name="data">string data to write.</param>
+        protected void WriteAscii(string data)
+        {  
+            Write(data, Ascii);
+        }
+#endif // !TUNING
+
         /// <summary>
         /// Writes string data into internal buffer using default encoding.
         /// </summary>

+ 14 - 0
src/Renci.SshNet/Common/SshDataStream.cs

@@ -210,11 +210,25 @@ namespace Renci.SshNet.Common
             return data;
         }
 
+        /// <summary>
+        /// Writes the stream contents to a byte array, regardless of the <see cref="MemoryStream.Position"/>.
+        /// </summary>
+        /// <returns>
+        /// This method returns a copy of the contents of the <see cref="SshDataStream"/> as a byte array.
+        /// If the current instance was constructed on a provided byte array, a copy of the section of the array to which this instance has access is returned.
+        /// TODO
+        /// </returns>
         public override byte[] ToArray()
         {
             if (Capacity == Length)
             {
+#if FEATURE_MEMORYSTREAM_GETBUFFER
                 return GetBuffer();
+#else
+                ArraySegment<byte> buffer;
+                if (TryGetBuffer(out buffer))
+                    return buffer.Array;
+#endif
             }
             return base.ToArray();
         }

+ 53 - 15
src/Renci.SshNet/ForwardedPortDynamic.NET.cs

@@ -6,9 +6,9 @@ using System.Text;
 using System.Net;
 using System.Net.Sockets;
 using System.Threading;
+using Renci.SshNet.Abstractions;
 using Renci.SshNet.Channels;
 using Renci.SshNet.Common;
-using ASCIIEncoding = Renci.SshNet.Common.ASCIIEncoding;
 
 namespace Renci.SshNet
 {
@@ -38,16 +38,22 @@ namespace Renci.SshNet
 
             _listenerCompleted = new ManualResetEvent(false);
 
-            ExecuteThread(() =>
+            ThreadAbstraction.ExecuteThread(() =>
                 {
                     try
                     {
                         while (true)
                         {
+#if FEATURE_SOCKET_EAP
+                            StartAccept();
+
+                            // TODO: wait for signal to stop
+#else
                             // accept new inbound connection
                             var asyncResult = _listener.BeginAccept(AcceptCallback, _listener);
                             // wait for the connection to be established
                             asyncResult.AsyncWaitHandle.WaitOne();
+#endif // FEATURE_SOCKET_EAP
                         }
                     }
                     catch (ObjectDisposedException)
@@ -83,6 +89,32 @@ namespace Renci.SshNet
             StopListener();
         }
 
+#if FEATURE_SOCKET_EAP
+        private void StartAccept()
+        {
+            var args = new SocketAsyncEventArgs();
+            args.Completed += AcceptCompleted;
+
+            if (!_listener.AcceptAsync(args))
+            {
+                AcceptCompleted(null, args);
+            }
+        }
+
+        private void AcceptCompleted(object sender, SocketAsyncEventArgs acceptAsyncEventArgs)
+        {
+            if (acceptAsyncEventArgs.SocketError != SocketError.Success)
+            {
+                StartAccept();
+                acceptAsyncEventArgs.AcceptSocket.Dispose();
+                return;
+            }
+
+            StartAccept();
+
+            ProcessAccept(acceptAsyncEventArgs.AcceptSocket);
+        }
+#else
         private void AcceptCallback(IAsyncResult ar)
         {
             // Get the socket that handles the client request
@@ -101,12 +133,18 @@ namespace Renci.SshNet
                 return;
             }
 
+            ProcessAccept(clientSocket);
+        }
+#endif // FEATURE_SOCKET_EAP
+
+        private void ProcessAccept(Socket remoteSocket)
+        {
             Interlocked.Increment(ref _pendingRequests);
 
             try
             {
-                clientSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.DontLinger, true);
-                clientSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.NoDelay, true);
+                remoteSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.DontLinger, true);
+                remoteSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.NoDelay, true);
 
                 using (var channel = Session.CreateChannelDirectTcpip())
                 {
@@ -116,26 +154,26 @@ namespace Renci.SshNet
 
                     // create eventhandler which is to be invoked to interrupt a blocking receive
                     // when we're closing the forwarded port
-                    EventHandler closeClientSocket = (sender, args) => CloseSocket(clientSocket);
+                    EventHandler closeClientSocket = (_, args) => CloseSocket(remoteSocket);
 
                     try
                     {
                         Closing += closeClientSocket;
 
-                        var bytesRead = clientSocket.Receive(version);
+                        var bytesRead = remoteSocket.Receive(version);
                         if (bytesRead == 0)
                         {
-                            CloseSocket(clientSocket);
+                            CloseSocket(remoteSocket);
                             return;
                         }
 
                         if (version[0] == 4)
                         {
-                            HandleSocks4(clientSocket, channel);
+                            HandleSocks4(remoteSocket, channel);
                         }
                         else if (version[0] == 5)
                         {
-                            HandleSocks5(clientSocket, channel);
+                            HandleSocks5(remoteSocket, channel);
                         }
                         else
                         {
@@ -164,12 +202,12 @@ namespace Renci.SshNet
                 {
                     RaiseExceptionEvent(ex);
                 }
-                CloseSocket(clientSocket);
+                CloseSocket(remoteSocket);
             }
             catch (Exception exp)
             {
                 RaiseExceptionEvent(exp);
-                CloseSocket(clientSocket);
+                CloseSocket(remoteSocket);
             }
             finally
             {
@@ -182,7 +220,7 @@ namespace Renci.SshNet
             if (socket.Connected)
             {
                 socket.Shutdown(SocketShutdown.Both);
-                socket.Close();
+                socket.Dispose();
             }
         }
 
@@ -193,7 +231,7 @@ namespace Renci.SshNet
                 return;
 
             // close listener socket
-            _listener.Close();
+            _listener.Dispose();
             // wait for listener loop to finish
             _listenerCompleted.WaitOne();
         }
@@ -223,7 +261,7 @@ namespace Renci.SshNet
                 if (stopWatch.Elapsed >= timeout && timeout != SshNet.Session.InfiniteTimeSpan)
                     break;
                 // give channels time to process pending requests
-                Thread.Sleep(50);
+                ThreadAbstraction.Sleep(50);
             }
 
             stopWatch.Stop();
@@ -338,7 +376,7 @@ namespace Renci.SshNet
                             addressBuffer = new byte[length];
                             stream.Read(addressBuffer, 0, addressBuffer.Length);
 
-                            ipAddress = IPAddress.Parse(new ASCIIEncoding().GetString(addressBuffer));
+                            ipAddress = IPAddress.Parse(SshData.Ascii.GetString(addressBuffer));
 
                             //var hostName = new Common.ASCIIEncoding().GetString(addressBuffer);
 

+ 0 - 17
src/Renci.SshNet/ForwardedPortDynamic.NET40.cs

@@ -1,17 +0,0 @@
-using System;
-using System.Threading;
-
-namespace Renci.SshNet
-{
-    public partial class ForwardedPortDynamic
-    {
-        /// <summary>
-        /// Executes the specified action in a separate thread.
-        /// </summary>
-        /// <param name="action">The action to execute.</param>
-        partial void ExecuteThread(Action action)
-        {
-            ThreadPool.QueueUserWorkItem(o => action());
-        }
-    }
-}

+ 0 - 6
src/Renci.SshNet/ForwardedPortDynamic.cs

@@ -101,12 +101,6 @@ namespace Renci.SshNet
         /// <param name="timeout">The maximum time to wait for the forwarded port to stop.</param>
         partial void InternalStop(TimeSpan timeout);
 
-        /// <summary>
-        /// Executes the specified action in a separate thread.
-        /// </summary>
-        /// <param name="action">The action to execute.</param>
-        partial void ExecuteThread(Action action);
-
         #region IDisposable Members
 
         /// <summary>

+ 41 - 7
src/Renci.SshNet/ForwardedPortLocal.NET.cs

@@ -3,6 +3,7 @@ using System.Diagnostics;
 using System.Net.Sockets;
 using System.Net;
 using System.Threading;
+using Renci.SshNet.Abstractions;
 using Renci.SshNet.Common;
 
 namespace Renci.SshNet
@@ -15,8 +16,6 @@ namespace Renci.SshNet
         private Socket _listener;
         private int _pendingRequests;
 
-        partial void ExecuteThread(Action action);
-
         partial void InternalStart()
         {
             var addr = BoundHost.GetIPAddress();
@@ -35,16 +34,19 @@ namespace Renci.SshNet
 
             _listenerTaskCompleted = new ManualResetEvent(false);
 
-            ExecuteThread(() =>
+            ThreadAbstraction.ExecuteThread(() =>
                 {
                     try
                     {
                         while (true)
                         {
+#if FEATURE_SOCKET_EAP
+#else
                             // accept new inbound connection
                             var asyncResult = _listener.BeginAccept(AcceptCallback, _listener);
                             // wait for the connection to be established
                             asyncResult.AsyncWaitHandle.WaitOne();
+#endif // FEATURE_SOCKET_EAP
                         }
                     }
                     catch (ObjectDisposedException)
@@ -64,10 +66,36 @@ namespace Renci.SshNet
                 });
         }
 
+#if FEATURE_SOCKET_EAP
+        private void StartAccept()
+        {
+            var args = new SocketAsyncEventArgs();
+            args.Completed += AcceptCompleted;
+
+            if (!_listener.AcceptAsync(args))
+            {
+                AcceptCompleted(null, args);
+            }
+        }
+
+        private void AcceptCompleted(object sender, SocketAsyncEventArgs acceptAsyncEventArgs)
+        {
+            if (acceptAsyncEventArgs.SocketError != SocketError.Success)
+            {
+                StartAccept();
+                acceptAsyncEventArgs.AcceptSocket.Dispose();
+                return;
+            }
+
+            StartAccept();
+
+            ProcessAccept(acceptAsyncEventArgs.AcceptSocket);
+        }
+#else
         private void AcceptCallback(IAsyncResult ar)
         {
             // Get the socket that handles the client request
-            var serverSocket = (Socket)ar.AsyncState;
+            var serverSocket = (Socket) ar.AsyncState;
 
             Socket clientSocket;
 
@@ -82,6 +110,12 @@ namespace Renci.SshNet
                 return;
             }
 
+            ProcessAccept(clientSocket);
+        }
+#endif // FEATURE_SOCKET_EAP
+
+        private void ProcessAccept(Socket clientSocket)
+        {
             Interlocked.Increment(ref _pendingRequests);
 
             try
@@ -118,7 +152,7 @@ namespace Renci.SshNet
             if (socket.Connected)
             {
                 socket.Shutdown(SocketShutdown.Both);
-                socket.Close();
+                socket.Dispose();
             }
         }
 
@@ -139,7 +173,7 @@ namespace Renci.SshNet
                 if (stopWatch.Elapsed >= timeout && timeout != SshNet.Session.InfiniteTimeSpan)
                     break;
                 // give channels time to process pending requests
-                Thread.Sleep(50);
+                ThreadAbstraction.Sleep(50);
             }
 
             stopWatch.Stop();
@@ -160,7 +194,7 @@ namespace Renci.SshNet
             Session.ErrorOccured -= Session_ErrorOccured;
 
             // close listener socket
-            _listener.Close();
+            _listener.Dispose();
             // wait for listener loop to finish
             _listenerTaskCompleted.WaitOne();
         }

+ 0 - 20
src/Renci.SshNet/ForwardedPortLocal.NET40.cs

@@ -1,20 +0,0 @@
-using System;
-using System.Threading;
-
-namespace Renci.SshNet
-{
-    /// <summary>
-    /// Provides functionality for local port forwarding
-    /// </summary>
-    public partial class ForwardedPortLocal 
-    {
-        /// <summary>
-        /// Executes the specified action in a separate thread.
-        /// </summary>
-        /// <param name="action">The action to execute.</param>
-        partial void ExecuteThread(Action action)
-        {
-            ThreadPool.QueueUserWorkItem(o => action());
-        }
-    }
-}

+ 5 - 2
src/Renci.SshNet/ForwardedPortRemote.NET.cs

@@ -1,4 +1,4 @@
-using System.Net;
+using Renci.SshNet.Abstractions;
 
 namespace Renci.SshNet
 {
@@ -29,7 +29,10 @@ namespace Renci.SshNet
         /// <param name="host">The host.</param>
         /// <param name="port">The port.</param>
         public ForwardedPortRemote(string boundHost, uint boundPort, string host, uint port)
-            : this(Dns.GetHostEntry(boundHost).AddressList[0], boundPort, Dns.GetHostEntry(host).AddressList[0], port)
+            : this(DnsAbstraction.GetHostEntry(boundHost).AddressList[0],
+                   boundPort,
+                   DnsAbstraction.GetHostEntry(host).AddressList[0],
+                   port)
         {
         }
     }

+ 0 - 20
src/Renci.SshNet/ForwardedPortRemote.NET40.cs

@@ -1,20 +0,0 @@
-using System;
-using System.Threading;
-
-namespace Renci.SshNet
-{
-    /// <summary>
-    /// Provides functionality for remote port forwarding
-    /// </summary>
-    public partial class ForwardedPortRemote
-    {
-        /// <summary>
-        /// Executes the specified action in a separate thread.
-        /// </summary>
-        /// <param name="action">The action to execute.</param>
-        partial void ExecuteThread(Action action)
-        {
-            ThreadPool.QueueUserWorkItem(o => action());
-        }
-    }
-}

+ 3 - 4
src/Renci.SshNet/ForwardedPortRemote.cs

@@ -4,6 +4,7 @@ using Renci.SshNet.Messages.Connection;
 using Renci.SshNet.Common;
 using System.Globalization;
 using System.Net;
+using Renci.SshNet.Abstractions;
 
 namespace Renci.SshNet
 {
@@ -170,7 +171,7 @@ namespace Renci.SshNet
                 if (elapsed >= timeout && timeout != SshNet.Session.InfiniteTimeSpan)
                     break;
                 // give channels time to process pending requests
-                Thread.Sleep(50);
+                ThreadAbstraction.Sleep(50);
             }
         }
 
@@ -199,7 +200,7 @@ namespace Renci.SshNet
                         return;
                     }
 
-                    ExecuteThread(() =>
+                    ThreadAbstraction.ExecuteThread(() =>
                         {
                             Interlocked.Increment(ref _pendingRequests);
 
@@ -249,8 +250,6 @@ namespace Renci.SshNet
             _globalRequestResponse.Set();
         }
 
-        partial void ExecuteThread(Action action);
-
         #region IDisposable Members
 
         private bool _isDisposed;

+ 0 - 17
src/Renci.SshNet/KeyboardInteractiveAuthenticationMethod.NET40.cs

@@ -1,17 +0,0 @@
-using System;
-using System.Threading;
-
-namespace Renci.SshNet
-{
-    public partial  class KeyboardInteractiveAuthenticationMethod
-    {
-        /// <summary>
-        /// Executes the specified action in a separate thread.
-        /// </summary>
-        /// <param name="action">The action to execute.</param>
-        partial void ExecuteThread(Action action)
-        {
-            ThreadPool.QueueUserWorkItem(o => action());
-        }
-    }
-}

+ 2 - 4
src/Renci.SshNet/KeyboardInteractiveAuthenticationMethod.cs

@@ -1,6 +1,7 @@
 using System;
 using System.Linq;
 using System.Threading;
+using Renci.SshNet.Abstractions;
 using Renci.SshNet.Messages;
 using Renci.SshNet.Messages.Authentication;
 using Renci.SshNet.Common;
@@ -108,7 +109,7 @@ namespace Renci.SshNet
             {
                 var eventArgs = new AuthenticationPromptEventArgs(this.Username, informationRequestMessage.Instruction, informationRequestMessage.Language, informationRequestMessage.Prompts);
 
-                this.ExecuteThread(() =>
+                ThreadAbstraction.ExecuteThread(() =>
                 {
                     try
                     {
@@ -136,8 +137,6 @@ namespace Renci.SshNet
             }
         }
 
-        partial void ExecuteThread(Action action);
-
         #region IDisposable Members
 
         private bool _isDisposed;
@@ -191,6 +190,5 @@ namespace Renci.SshNet
         }
 
         #endregion
-
     }
 }

+ 8 - 4
src/Renci.SshNet/Messages/Authentication/InformationRequestMessage.cs

@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.Text;
 using Renci.SshNet.Common;
 
 namespace Renci.SshNet.Messages.Authentication
@@ -35,16 +36,19 @@ namespace Renci.SshNet.Messages.Authentication
         /// </summary>
         protected override void LoadData()
         {
-            Name = ReadString();
-            Instruction = ReadString();
-            Language = ReadString();
+            Name = ReadString(Encoding.UTF8);
+            Instruction = ReadString(Encoding.UTF8);
+
+            // language tag as defined in rfc3066:
+            // Language tags may always be presented using the characters A-Z, a-z, 0 - 9 and HYPHEN-MINUS
+            Language = ReadString(Ascii);
 
             var numOfPrompts = ReadUInt32();
             var prompts = new List<AuthenticationPrompt>();
 
             for (var i = 0; i < numOfPrompts; i++)
             {
-                var prompt = ReadString();
+                var prompt = ReadString(Encoding.UTF8);
                 var echo = ReadBoolean();
                 prompts.Add(new AuthenticationPrompt(i, echo, prompt));
             }

+ 7 - 7
src/Renci.SshNet/Messages/Message.cs

@@ -1,11 +1,11 @@
-using System.Collections.Generic;
-using System.IO;
+using System.IO;
 using System.Linq;
 using System.Security.Cryptography;
 using Renci.SshNet.Common;
 using System.Globalization;
+using Renci.SshNet.Abstractions;
 using Renci.SshNet.Compression;
-using Renci.SshNet.Sftp;
+using Renci.SshNet.Security.Cryptography;
 
 namespace Renci.SshNet.Messages
 {
@@ -14,7 +14,7 @@ namespace Renci.SshNet.Messages
     /// </summary>
     public abstract class Message : SshData
     {
-        private static readonly RNGCryptoServiceProvider Randomizer = new RNGCryptoServiceProvider();
+        private static readonly RandomNumberGenerator Randomizer = HashAlgorithmFactory.CreateRandomNumberGenerator();
 
         /// <summary>
         /// Gets the index that represents zero in current data type.
@@ -50,7 +50,7 @@ namespace Renci.SshNet.Messages
         /// </summary>
         protected override void WriteBytes(SshDataStream stream)
         {
-            var messageAttribute = GetType().GetCustomAttributes(typeof(MessageAttribute), true).FirstOrDefault() as MessageAttribute;
+            var messageAttribute = GetType().GetCustomAttributes<MessageAttribute>(true).FirstOrDefault();
 
             if (messageAttribute == null)
                 throw new SshException(string.Format(CultureInfo.CurrentCulture, "Type '{0}' is not a valid message type.", GetType().AssemblyQualifiedName));
@@ -173,7 +173,7 @@ namespace Renci.SshNet.Messages
         /// <returns>Byte array representation of the message</returns>
         public override byte[] GetBytes()
         {
-            var messageAttribute = GetType().GetCustomAttributes(typeof(MessageAttribute), true).SingleOrDefault() as MessageAttribute;
+            var messageAttribute = GetType().GetTypeInfo().GetCustomAttributes(typeof(MessageAttribute), true).SingleOrDefault() as MessageAttribute;
 
             if (messageAttribute == null)
                 throw new SshException(string.Format(CultureInfo.CurrentCulture, "Type '{0}' is not a valid message type.", GetType().AssemblyQualifiedName));
@@ -194,7 +194,7 @@ namespace Renci.SshNet.Messages
         /// </returns>
         public override string ToString()
         {
-            var messageAttribute = GetType().GetCustomAttributes(typeof(MessageAttribute), true).SingleOrDefault() as MessageAttribute;
+            var messageAttribute = GetType().GetCustomAttributes<MessageAttribute>(true).SingleOrDefault();
 
             if (messageAttribute == null)
                 return string.Format(CultureInfo.CurrentCulture, "'{0}' without Message attribute.", GetType().FullName);

+ 2 - 1
src/Renci.SshNet/Messages/Transport/KeyExchangeInitMessage.cs

@@ -1,5 +1,6 @@
 using System;
 using System.Security.Cryptography;
+using Renci.SshNet.Security.Cryptography;
 
 namespace Renci.SshNet.Messages.Transport
 {
@@ -9,7 +10,7 @@ namespace Renci.SshNet.Messages.Transport
     [Message("SSH_MSG_KEXINIT", 20)]
     public class KeyExchangeInitMessage : Message, IKeyExchangedAllowed
     {
-        private static readonly RNGCryptoServiceProvider Randomizer = new RNGCryptoServiceProvider();
+        private static readonly RandomNumberGenerator Randomizer = HashAlgorithmFactory.CreateRandomNumberGenerator();
 
         /// <summary>
         /// Initializes a new instance of the <see cref="KeyExchangeInitMessage"/> class.

+ 0 - 17
src/Renci.SshNet/PasswordAuthenticationMethod.NET40.cs

@@ -1,17 +0,0 @@
-using System;
-using System.Threading;
-
-namespace Renci.SshNet
-{
-    public partial class PasswordAuthenticationMethod
-    {
-        /// <summary>
-        /// Executes the specified action in a separate thread.
-        /// </summary>
-        /// <param name="action">The action to execute.</param>
-        partial void ExecuteThread(Action action)
-        {
-            ThreadPool.QueueUserWorkItem(o => action());
-        }
-    }
-}

+ 2 - 4
src/Renci.SshNet/PasswordAuthenticationMethod.cs

@@ -2,6 +2,7 @@
 using System.Linq;
 using System.Text;
 using System.Threading;
+using Renci.SshNet.Abstractions;
 using Renci.SshNet.Common;
 using Renci.SshNet.Messages.Authentication;
 using Renci.SshNet.Messages;
@@ -132,7 +133,7 @@ namespace Renci.SshNet
             {
                 _session.UnRegisterMessage("SSH_MSG_USERAUTH_PASSWD_CHANGEREQ");
 
-                ExecuteThread(() =>
+                ThreadAbstraction.ExecuteThread(() =>
                 {
                     try
                     {
@@ -156,8 +157,6 @@ namespace Renci.SshNet
             }
         }
 
-        partial void ExecuteThread(Action action);
-
         #region IDisposable Members
 
         private bool _isDisposed;
@@ -211,6 +210,5 @@ namespace Renci.SshNet
         }
 
         #endregion
-
     }
 }

+ 4 - 4
src/Renci.SshNet/PrivateKeyFile.cs

@@ -207,8 +207,8 @@ namespace Renci.SshNet
                     }
 
                     reader.ReadUInt32(); //  Read total bytes length including magic number
-                    var keyType = reader.ReadString();
-                    var ssh2CipherName = reader.ReadString();
+                    var keyType = reader.ReadString(SshData.Ascii);
+                    var ssh2CipherName = reader.ReadString(SshData.Ascii);
                     var blobSize = (int)reader.ReadUInt32();
 
                     byte[] keyData;
@@ -408,9 +408,9 @@ namespace Renci.SshNet
                 return base.ReadUInt32();
             }
 
-            public new string ReadString()
+            public new string ReadString(Encoding encoding)
             {
-                return base.ReadString();
+                return base.ReadString(encoding);
             }
 
             public new byte[] ReadBytes(int length)

+ 4 - 14
src/Renci.SshNet/Renci.SshNet.csproj

@@ -18,7 +18,7 @@
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>TRACE;DEBUG;TUNING;FEATURE_HASH_MD5;FEATURE_HASH_SHA1;FEATURE_HASH_SHA256;FEATURE_HASH_SHA384;FEATURE_HASH_SHA512;FEATURE_HASH_RIPEMD160;FEATURE_HMAC_MD5;FEATURE_HMAC_SHA1;FEATURE_HMAC_SHA256;FEATURE_HMAC_SHA384;FEATURE_HMAC_SHA512;FEATURE_HMAC_RIPEMD160</DefineConstants>
+    <DefineConstants>TRACE;DEBUG;TUNING;FEATURE_HASH_MD5;FEATURE_HASH_SHA1;FEATURE_HASH_SHA256;FEATURE_HASH_SHA384;FEATURE_HASH_SHA512;FEATURE_HASH_RIPEMD160;FEATURE_HMAC_MD5;FEATURE_HMAC_SHA1;FEATURE_HMAC_SHA256;FEATURE_HMAC_SHA384;FEATURE_HMAC_SHA512;FEATURE_HMAC_RIPEMD160;FEATURE_MEMORYSTREAM_GETBUFFER;FEATURE_THREAD_SLEEP</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <DocumentationFile>bin\Debug\Renci.SshNet.xml</DocumentationFile>
@@ -46,6 +46,9 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="Abstractions\DnsAbstraction.cs" />
+    <Compile Include="Abstractions\ReflectionAbstraction.cs" />
+    <Compile Include="Abstractions\ThreadAbstraction.cs" />
     <Compile Include="AuthenticationMethod.cs">
       <SubType>Code</SubType>
     </Compile>
@@ -174,14 +177,12 @@
     <Compile Include="ServiceFactory.NET.cs" />
     <Compile Include="Sftp\ISftpSession.cs" />
     <Compile Include="Common\SshDataStream.cs" />
-    <Compile Include="ShellStream.NET40.cs" />
     <Compile Include="ExpectAsyncResult.cs" />
     <Compile Include="Security\KeyExchangeDiffieHellmanGroupSha1.cs" />
     <Compile Include="SftpClient.NET.cs" />
     <Compile Include="KeyboardInteractiveAuthenticationMethod.cs">
       <SubType>Code</SubType>
     </Compile>
-    <Compile Include="KeyboardInteractiveAuthenticationMethod.NET40.cs" />
     <Compile Include="KeyboardInteractiveConnectionInfo.cs" />
     <Compile Include="NoneAuthenticationMethod.cs">
       <SubType>Code</SubType>
@@ -189,7 +190,6 @@
     <Compile Include="PasswordAuthenticationMethod.cs">
       <SubType>Code</SubType>
     </Compile>
-    <Compile Include="PasswordAuthenticationMethod.NET40.cs" />
     <Compile Include="ExpectAction.cs">
       <SubType>Code</SubType>
     </Compile>
@@ -197,9 +197,6 @@
       <SubType>Code</SubType>
     </Compile>
     <Compile Include="ForwardedPortDynamic.NET.cs" />
-    <Compile Include="ForwardedPortDynamic.NET40.cs">
-      <SubType>Code</SubType>
-    </Compile>
     <Compile Include="ForwardedPortLocal.NET.cs" />
     <Compile Include="Messages\Transport\IKeyExchangedAllowed.cs" />
     <Compile Include="PasswordConnectionInfo.cs" />
@@ -218,11 +215,7 @@
     <Compile Include="ForwardedPortLocal.cs">
       <SubType>Code</SubType>
     </Compile>
-    <Compile Include="ForwardedPortLocal.NET40.cs">
-      <SubType>Code</SubType>
-    </Compile>
     <Compile Include="ForwardedPortRemote.cs" />
-    <Compile Include="ForwardedPortRemote.NET40.cs" />
     <Compile Include="MessageEventArgs.cs" />
     <Compile Include="Messages\Authentication\BannerMessage.cs" />
     <Compile Include="Messages\Authentication\FailureMessage.cs" />
@@ -390,7 +383,6 @@
     <Compile Include="SftpClient.cs">
       <SubType>Code</SubType>
     </Compile>
-    <Compile Include="SftpClient.NET40.cs" />
     <Compile Include="Sftp\Flags.cs" />
     <Compile Include="Sftp\Requests\ExtendedRequests\FStatVfsRequest.cs" />
     <Compile Include="Sftp\Requests\ExtendedRequests\HardLinkRequest.cs" />
@@ -455,13 +447,11 @@
       <SubType>Code</SubType>
     </Compile>
     <Compile Include="Shell.cs" />
-    <Compile Include="Shell.NET40.cs" />
     <Compile Include="ShellStream.cs">
       <SubType>Code</SubType>
     </Compile>
     <Compile Include="SshClient.cs" />
     <Compile Include="SshCommand.cs" />
-    <Compile Include="SshCommand.NET40.cs" />
     <Compile Include="SubsystemSession.cs" />
   </ItemGroup>
   <ItemGroup>

+ 1 - 1
src/Renci.SshNet/ScpClient.NET.cs

@@ -299,7 +299,7 @@ namespace Renci.SshNet
 
         partial void SendData(IChannelSession channel, string command)
         {
-            channel.SendData(Encoding.Default.GetBytes(command));
+            channel.SendData(SshData.Utf8.GetBytes(command));
         }
     }
 }

+ 2 - 3
src/Renci.SshNet/ScpClient.cs

@@ -1,12 +1,11 @@
 using System;
-using System.Linq;
 using System.Text;
 using Renci.SshNet.Channels;
 using System.IO;
 using Renci.SshNet.Common;
 using System.Text.RegularExpressions;
-using System.Threading;
 using System.Diagnostics.CodeAnalysis;
+using Renci.SshNet.Abstractions;
 
 namespace Renci.SshNet
 {
@@ -389,7 +388,7 @@ namespace Renci.SshNet
 
             while (b < 0)
             {
-                Thread.Sleep(100);
+                ThreadAbstraction.Sleep(100);
                 b = stream.ReadByte();
             }
 

+ 1 - 1
src/Renci.SshNet/Security/Cryptography/DsaDigitalSignature.cs

@@ -179,7 +179,7 @@ namespace Renci.SshNet.Security.Cryptography
                     // Dispose managed ResourceMessages.
                     if (this._hash != null)
                     {
-                        this._hash.Clear();
+                        this._hash.Dispose();
                         this._hash = null;
                     }
                 }

+ 12 - 1
src/Renci.SshNet/Security/Cryptography/HashAlgorithmFactory.cs

@@ -1,7 +1,18 @@
-namespace Renci.SshNet.Security.Cryptography
+using System.Security.Cryptography;
+
+namespace Renci.SshNet.Security.Cryptography
 {
     internal static class HashAlgorithmFactory
     {
+        public static RandomNumberGenerator CreateRandomNumberGenerator()
+        {
+#if FEATURE_RNG_CRYPTO
+            return new RNGCryptoServiceProvider();
+#else
+            return RandomNumberGenerator.Create();
+#endif
+        }
+
 #if FEATURE_HASH_MD5
         public static System.Security.Cryptography.MD5 CreateMD5()
         {

+ 1 - 1
src/Renci.SshNet/Security/Cryptography/RsaDigitalSignature.cs

@@ -64,7 +64,7 @@ namespace Renci.SshNet.Security.Cryptography
                     // Dispose managed ResourceMessages.
                     if (this._hash != null)
                     {
-                        this._hash.Clear();
+                        this._hash.Dispose();
                         this._hash = null;
                     }
                 }

+ 0 - 5
src/Renci.SshNet/Security/KeyExchangeDiffieHellman.cs

@@ -90,13 +90,8 @@ namespace Renci.SshNet.Security
         {
             base.Start(session, message);
 
-#if TUNING
             _serverPayload = message.GetBytes();
             _clientPayload = Session.ClientInitMessage.GetBytes();
-#else
-            this._serverPayload = message.GetBytes().ToArray();
-            this._clientPayload = this.Session.ClientInitMessage.GetBytes().ToArray();
-#endif
         }
 
         /// <summary>

+ 0 - 3
src/Renci.SshNet/ServiceFactory.NET.cs

@@ -1,7 +1,4 @@
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using Renci.SshNet.NetConf;
 
 namespace Renci.SshNet

+ 27 - 9
src/Renci.SshNet/Session.NET.cs

@@ -4,10 +4,10 @@ using System;
 using System.Net.Sockets;
 using System.Net;
 using Renci.SshNet.Common;
-using System.Threading;
 using Renci.SshNet.Messages.Transport;
 using System.Diagnostics;
 using System.Collections.Generic;
+using Renci.SshNet.Abstractions;
 
 namespace Renci.SshNet
 {
@@ -17,12 +17,14 @@ namespace Renci.SshNet
         private const byte CarriageReturn = 0x0d;
         private const byte LineFeed = 0x0a;
 
+#if FEATURE_DIAGNOSTICS_TRACESOURCE
         private readonly TraceSource _log =
 #if DEBUG
             new TraceSource("SshNet.Logging", SourceLevels.All);
 #else
             new TraceSource("SshNet.Logging");
-#endif
+#endif // DEBUG
+#endif // FEATURE_DIAGNOSTICS_TRACESOURCE
 
         /// <summary>
         /// Holds the lock object to ensure read access to the socket is synchronized.
@@ -111,12 +113,18 @@ namespace Renci.SshNet
 
             Log(string.Format("Initiating connect to '{0}:{1}'.", ConnectionInfo.Host, ConnectionInfo.Port));
 
+#if FEATURE_SOCKET_EAP
+            if (!_socket.ConnectAsync(ep).Wait(timeout))
+                throw new SshOperationTimeoutException(string.Format(CultureInfo.InvariantCulture,
+                    "Connection failed to establish within {0:F0} milliseconds.", timeout.TotalMilliseconds));
+#else
             var connectResult = _socket.BeginConnect(ep, null, null);
             if (!connectResult.AsyncWaitHandle.WaitOne(timeout, false))
                 throw new SshOperationTimeoutException(string.Format(CultureInfo.InvariantCulture,
                     "Connection failed to establish within {0:F0} milliseconds.", timeout.TotalMilliseconds));
 
             _socket.EndConnect(connectResult);
+#endif // FEATURE_SOCKET_ASYNC_TPL
         }
 
         /// <summary>
@@ -125,7 +133,7 @@ namespace Renci.SshNet
         /// <exception cref="SocketException">An error occurred when trying to access the socket.</exception>
         partial void SocketDisconnect()
         {
-            _socket.Disconnect(true);
+            _socket.Dispose();
         }
 
         /// <summary>
@@ -137,7 +145,6 @@ namespace Renci.SshNet
         /// <exception cref="SocketException">An error occurred when trying to access the socket.</exception>
         partial void SocketReadLine(ref string response, TimeSpan timeout)
         {
-            var encoding = new ASCIIEncoding();
             var buffer = new List<byte>();
             var data = new byte[1];
 
@@ -145,12 +152,21 @@ namespace Renci.SshNet
             // to be processed by subsequent invocations
             do
             {
+#if FEATURE_SOCKET_TAP
+                var receiveTask = _socket.ReceiveAsync(new ArraySegment<byte>(data, 0, data.Length), SocketFlags.None);
+                if (!receiveTask.Wait(timeout))
+                    throw new SshOperationTimeoutException(string.Format(CultureInfo.InvariantCulture,
+                        "Socket read operation has timed out after {0:F0} milliseconds.", timeout.TotalMilliseconds));
+
+                var received = receiveTask.Result;
+#else
                 var asyncResult = _socket.BeginReceive(data, 0, data.Length, SocketFlags.None, null, null);
                 if (!asyncResult.AsyncWaitHandle.WaitOne(timeout))
                     throw new SshOperationTimeoutException(string.Format(CultureInfo.InvariantCulture,
                         "Socket read operation has timed out after {0:F0} milliseconds.", timeout.TotalMilliseconds));
 
                 var received = _socket.EndReceive(asyncResult);
+#endif // FEATURE_SOCKET_TAP
 
                 if (received == 0)
                     // the remote server shut down the socket
@@ -167,12 +183,12 @@ namespace Renci.SshNet
                 response = string.Empty;
             else if (buffer.Count > 1 && buffer[buffer.Count - 2] == CarriageReturn)
                 // strip trailing CRLF
-                response = encoding.GetString(buffer.Take(buffer.Count - 2).ToArray());
+                response = SshData.Ascii.GetString(buffer.Take(buffer.Count - 2).ToArray());
             else if (buffer.Count > 1 && buffer[buffer.Count - 1] == LineFeed)
                 // strip trailing LF
-                response = encoding.GetString(buffer.Take(buffer.Count - 1).ToArray());
+                response = SshData.Ascii.GetString(buffer.Take(buffer.Count - 1).ToArray());
             else
-                response = encoding.GetString(buffer.ToArray());
+                response = SshData.Ascii.GetString(buffer.ToArray());
         }
 
         /// <summary>
@@ -222,7 +238,7 @@ namespace Renci.SshNet
                         exp.SocketErrorCode == SocketError.NoBufferSpaceAvailable)
                     {
                         // socket buffer is probably empty, wait and try again
-                        Thread.Sleep(30);
+                        ThreadAbstraction.Sleep(30);
                     }
                     else
                     {
@@ -259,7 +275,7 @@ namespace Renci.SshNet
                         ex.SocketErrorCode == SocketError.NoBufferSpaceAvailable)
                     {
                         // socket buffer is probably full, wait and try again
-                        Thread.Sleep(30);
+                        ThreadAbstraction.Sleep(30);
                     }
                     else
                         throw;  // any serious error occurr
@@ -270,7 +286,9 @@ namespace Renci.SshNet
         [Conditional("DEBUG")]
         partial void Log(string text)
         {
+#if FEATURE_DIAGNOSTICS_TRACESOURCE
             _log.TraceEvent(TraceEventType.Verbose, 1, text);
+#endif // FEATURE_DIAGNOSTICS_TRACESOURCE
         }
 
 #if ASYNC_SOCKET_READ

+ 0 - 11
src/Renci.SshNet/Session.NET40.cs

@@ -1,8 +1,6 @@
 using System.Threading.Tasks;
 using System.Linq;
-using System;
 using Renci.SshNet.Messages;
-using System.Threading;
 
 namespace Renci.SshNet
 {
@@ -16,15 +14,6 @@ namespace Renci.SshNet
             HandleMessage((dynamic)message);
         }
 
-        /// <summary>
-        /// Executes the specified action in a separate thread.
-        /// </summary>
-        /// <param name="action">The action to execute.</param>
-        partial void ExecuteThread(Action action)
-        {
-            ThreadPool.QueueUserWorkItem(o => action());
-        }
-
         partial void InternalRegisterMessage(string messageName)
         {
             lock (_messagesMetadata)

+ 15 - 21
src/Renci.SshNet/Session.cs

@@ -16,8 +16,8 @@ using Renci.SshNet.Messages.Connection;
 using Renci.SshNet.Messages.Transport;
 using Renci.SshNet.Security;
 using System.Globalization;
+using Renci.SshNet.Abstractions;
 using Renci.SshNet.Security.Cryptography;
-using ASCIIEncoding = Renci.SshNet.Common.ASCIIEncoding;
 
 namespace Renci.SshNet
 {
@@ -64,7 +64,7 @@ namespace Renci.SshNet
         private const int LocalChannelDataPacketSize = 1024*64;
 
 #if !TUNING
-        private static readonly RNGCryptoServiceProvider Randomizer = new RNGCryptoServiceProvider();
+        private static readonly RandomNumberGenerator Randomizer = HashAlgorithmFactory.CreateRandomNumberGenerator();
 #endif
 
 #if SILVERLIGHT
@@ -596,7 +596,7 @@ namespace Renci.SshNet
                     _messageListenerCompleted.Reset();
 
                     //  Start incoming request listener
-                    ExecuteThread(MessageListener);
+                    ThreadAbstraction.ExecuteThread(MessageListener);
 
                     //  Wait for key exchange to be completed
                     WaitOnHandle(_keyExchangeCompletedWaitHandle);
@@ -1390,13 +1390,13 @@ namespace Renci.SshNet
             //  Dispose of old ciphers and hash algorithms
             if (_serverMac != null)
             {
-                _serverMac.Clear();
+                _serverMac.Dispose();
                 _serverMac = null;
             }
 
             if (_clientMac != null)
             {
-                _clientMac.Clear();
+                _clientMac.Dispose();
                 _clientMac = null;
             }
 
@@ -1749,8 +1749,6 @@ namespace Renci.SshNet
 
         #endregion
 
-        partial void ExecuteThread(Action action);
-
         /// <summary>
         /// Gets a value indicating whether the socket is connected.
         /// </summary>
@@ -1881,7 +1879,7 @@ namespace Renci.SshNet
             SocketWrite(ipAddress.GetAddressBytes());
 
             //  Send username
-            var username = new ASCIIEncoding().GetBytes(ConnectionInfo.ProxyUsername);
+            var username = SshData.Ascii.GetBytes(ConnectionInfo.ProxyUsername);
             SocketWrite(username);
             SocketWriteByte(0x00);
 
@@ -1943,9 +1941,7 @@ namespace Renci.SshNet
                     //  Send version
                     SocketWriteByte(0x01);
 
-                    var encoding = new ASCIIEncoding();
-
-                    var username = encoding.GetBytes(ConnectionInfo.ProxyUsername);
+                    var username = SshData.Ascii.GetBytes(ConnectionInfo.ProxyUsername);
 
                     if (username.Length > byte.MaxValue)
                         throw new ProxyException("Proxy username is too long.");
@@ -1956,7 +1952,7 @@ namespace Renci.SshNet
                     //  Send username
                     SocketWrite(username);
 
-                    var password = encoding.GetBytes(ConnectionInfo.ProxyPassword);
+                    var password = SshData.Ascii.GetBytes(ConnectionInfo.ProxyPassword);
 
                     if (password.Length > byte.MaxValue)
                         throw new ProxyException("Proxy password is too long.");
@@ -2079,20 +2075,18 @@ namespace Renci.SshNet
             var httpResponseRe = new Regex(@"HTTP/(?<version>\d[.]\d) (?<statusCode>\d{3}) (?<reasonPhrase>.+)$");
             var httpHeaderRe = new Regex(@"(?<fieldName>[^\[\]()<>@,;:\""/?={} \t]+):(?<fieldValue>.+)?");
 
-            var encoding = new ASCIIEncoding();
-
-            SocketWrite(encoding.GetBytes(string.Format("CONNECT {0}:{1} HTTP/1.0\r\n", ConnectionInfo.Host, ConnectionInfo.Port)));
+            SocketWrite(SshData.Ascii.GetBytes(string.Format("CONNECT {0}:{1} HTTP/1.0\r\n", ConnectionInfo.Host, ConnectionInfo.Port)));
 
             //  Sent proxy authorization is specified
             if (!string.IsNullOrEmpty(ConnectionInfo.ProxyUsername))
             {
                 var authorization = string.Format("Proxy-Authorization: Basic {0}\r\n",
-                                                  Convert.ToBase64String(encoding.GetBytes(string.Format("{0}:{1}", ConnectionInfo.ProxyUsername, ConnectionInfo.ProxyPassword)))
+                                                  Convert.ToBase64String(SshData.Ascii.GetBytes(string.Format("{0}:{1}", ConnectionInfo.ProxyUsername, ConnectionInfo.ProxyPassword)))
                                                   );
-                SocketWrite(encoding.GetBytes(authorization));
+                SocketWrite(SshData.Ascii.GetBytes(authorization));
             }
 
-            SocketWrite(encoding.GetBytes("\r\n"));
+            SocketWrite(SshData.Ascii.GetBytes("\r\n"));
 
             HttpStatusCode? statusCode = null;
             var response = string.Empty;
@@ -2128,7 +2122,7 @@ namespace Renci.SshNet
                 if (headerMatch.Success)
                 {
                     var fieldName = headerMatch.Result("${fieldName}");
-                    if (fieldName.Equals("Content-Length", StringComparison.InvariantCultureIgnoreCase))
+                    if (fieldName.Equals("Content-Length", StringComparison.OrdinalIgnoreCase))
                     {
                         contentLength = int.Parse(headerMatch.Result("${fieldValue}"));
                     }
@@ -2257,13 +2251,13 @@ namespace Renci.SshNet
 
                     if (_serverMac != null)
                     {
-                        _serverMac.Clear();
+                        _serverMac.Dispose();
                         _serverMac = null;
                     }
 
                     if (_clientMac != null)
                     {
-                        _clientMac.Clear();
+                        _clientMac.Dispose();
                         _clientMac = null;
                     }
 

+ 1 - 1
src/Renci.SshNet/Sftp/Responses/SftpNameResponse.cs

@@ -33,7 +33,7 @@ namespace Renci.SshNet.Sftp.Responses
             for (int i = 0; i < this.Count; i++)
             {
                 var fileName = this.ReadString(this.Encoding);
-                this.ReadString();   //  skip longname
+                this.ReadString(this.Encoding);   //  skip longname
                 var attributes = this.ReadAttributes();
                 this.Files[i] = new KeyValuePair<string, SftpFileAttributes>(fileName, attributes);
             }

+ 10 - 3
src/Renci.SshNet/Sftp/Responses/SftpStatusResponse.cs

@@ -1,4 +1,7 @@
-namespace Renci.SshNet.Sftp.Responses
+using System.Text;
+using Renci.SshNet.Common;
+
+namespace Renci.SshNet.Sftp.Responses
 {
     internal class SftpStatusResponse : SftpResponse
     {
@@ -31,8 +34,12 @@
 
             if (!this.IsEndOfData)
             {
-                this.ErrorMessage = this.ReadString();
-                this.Language = this.ReadString();
+                // the SSH File Transfer Protocol specification states that the error message is UTF-8
+                this.ErrorMessage = this.ReadString(Utf8);
+
+                // the language of the error message; RFC 1766 states that the language code may be
+                // expressed as US-ASCII
+                this.Language = this.ReadString(Ascii);
             }
         }
     }

+ 3 - 3
src/Renci.SshNet/Sftp/SftpSession.cs

@@ -126,9 +126,9 @@ namespace Renci.SshNet.Sftp
                 return canonizedPath;
 
             //  Check for special cases
-            if (fullPath.EndsWith("/.", StringComparison.InvariantCultureIgnoreCase) ||
-                fullPath.EndsWith("/..", StringComparison.InvariantCultureIgnoreCase) ||
-                fullPath.Equals("/", StringComparison.InvariantCultureIgnoreCase) ||
+            if (fullPath.EndsWith("/.", StringComparison.OrdinalIgnoreCase) ||
+                fullPath.EndsWith("/..", StringComparison.OrdinalIgnoreCase) ||
+                fullPath.Equals("/", StringComparison.OrdinalIgnoreCase) ||
                 fullPath.IndexOf('/') < 0)
                 return fullPath;
 

+ 2 - 1
src/Renci.SshNet/SftpClient.NET.cs

@@ -5,6 +5,7 @@ using System.IO;
 using Renci.SshNet.Common;
 using Renci.SshNet.Sftp;
 using System.Globalization;
+using Renci.SshNet.Abstractions;
 
 namespace Renci.SshNet
 {
@@ -49,7 +50,7 @@ namespace Renci.SshNet
 
             var asyncResult = new SftpSynchronizeDirectoriesAsyncResult(asyncCallback, state);
 
-            ExecuteThread(() =>
+            ThreadAbstraction.ExecuteThread(() =>
             {
                 try
                 {

+ 0 - 20
src/Renci.SshNet/SftpClient.NET40.cs

@@ -1,20 +0,0 @@
-using System;
-using System.Threading;
-
-namespace Renci.SshNet
-{
-    /// <summary>
-    /// 
-    /// </summary>
-    public partial class SftpClient
-    {
-        /// <summary>
-        /// Executes the specified action in a separate thread.
-        /// </summary>
-        /// <param name="action">The action to execute.</param>
-        partial void ExecuteThread(Action action)
-        {
-            ThreadPool.QueueUserWorkItem(o => action());
-        }
-    }
-}

+ 7 - 8
src/Renci.SshNet/SftpClient.cs

@@ -8,6 +8,7 @@ using Renci.SshNet.Common;
 using System.Globalization;
 using System.Threading;
 using System.Diagnostics.CodeAnalysis;
+using Renci.SshNet.Abstractions;
 
 namespace Renci.SshNet
 {
@@ -468,7 +469,7 @@ namespace Renci.SshNet
 
             var asyncResult = new SftpListDirectoryAsyncResult(asyncCallback, state);
 
-            ExecuteThread(() =>
+            ThreadAbstraction.ExecuteThread(() =>
             {
                 try
                 {
@@ -687,7 +688,7 @@ namespace Renci.SshNet
 
             var asyncResult = new SftpDownloadAsyncResult(asyncCallback, state);
 
-            ExecuteThread(() =>
+            ThreadAbstraction.ExecuteThread(() =>
             {
                 try
                 {
@@ -888,7 +889,7 @@ namespace Renci.SshNet
 
             var asyncResult = new SftpUploadAsyncResult(asyncCallback, state);
 
-            ExecuteThread(() =>
+            ThreadAbstraction.ExecuteThread(() =>
             {
                 try
                 {
@@ -1606,7 +1607,7 @@ namespace Renci.SshNet
                 if (listCallback != null)
                 {
                     //  Execute callback on different thread
-                    ExecuteThread(() => listCallback(result.Count));
+                    ThreadAbstraction.ExecuteThread(() => listCallback(result.Count));
                 }
 
                 files = _sftpSession.RequestReadDir(handle);
@@ -1665,7 +1666,7 @@ namespace Renci.SshNet
                 if (downloadCallback != null)
                 {
                     //  Execute callback on different thread
-                    ExecuteThread(() => { downloadCallback(offset); });
+                    ThreadAbstraction.ExecuteThread(() => { downloadCallback(offset); });
                 }
 
                 data = _sftpSession.RequestRead(handle, offset, optimalReadLength);
@@ -1746,7 +1747,7 @@ namespace Renci.SshNet
                             if (uploadCallback != null)
                             {
                                 //  Execute callback on different thread
-                                ExecuteThread(() => uploadCallback(writtenBytes));
+                                ThreadAbstraction.ExecuteThread(() => uploadCallback(writtenBytes));
                             }
                         }
                     });
@@ -1766,8 +1767,6 @@ namespace Renci.SshNet
             _sftpSession.RequestClose(handle);
         }
 
-        partial void ExecuteThread(Action action);
-
         /// <summary>
         /// Called when client is connected to the server.
         /// </summary>

+ 0 - 17
src/Renci.SshNet/Shell.NET40.cs

@@ -1,17 +0,0 @@
-using System;
-using System.Threading;
-
-namespace Renci.SshNet
-{
-    /// <summary>
-    /// Represents instance of the SSH shell object
-    /// </summary>
-    public partial class Shell 
-    {
-        /// <exception cref="ArgumentNullException"><paramref name=" action"/> is null.</exception>
-        partial void ExecuteThread(Action action)
-        {
-            ThreadPool.QueueUserWorkItem(o => action());
-        }
-    }
-}

+ 21 - 6
src/Renci.SshNet/Shell.cs

@@ -1,10 +1,10 @@
 using System;
-using System.Linq;
 using System.IO;
 using System.Threading;
 using Renci.SshNet.Channels;
 using Renci.SshNet.Common;
 using System.Collections.Generic;
+using Renci.SshNet.Abstractions;
 
 namespace Renci.SshNet
 {
@@ -134,7 +134,7 @@ namespace Renci.SshNet
 
             //  Start input stream listener
             _dataReaderTaskCompleted = new ManualResetEvent(false);
-            ExecuteThread(() =>
+            ThreadAbstraction.ExecuteThread(() =>
             {
                 try
                 {
@@ -142,6 +142,22 @@ namespace Renci.SshNet
 
                     while (_channel.IsOpen)
                     {
+#if FEATURE_STREAM_ASYNC_TPL
+                        var readTask = _input.ReadAsync(buffer, 0, buffer.Length);
+                        var readWaitHandle = ((IAsyncResult) readTask).AsyncWaitHandle;
+
+                        if (WaitHandle.WaitAny(new[] {readWaitHandle, _channelClosedWaitHandle}) == 0)
+                        {
+                            var read = readTask.Result;
+#if TUNING
+                            _channel.SendData(buffer, 0, read);
+#else
+                            _channel.SendData(buffer.Take(read).ToArray());
+#endif
+                            continue;
+                        }
+
+#else
                         var asyncResult = _input.BeginRead(buffer, 0, buffer.Length, delegate(IAsyncResult result)
                         {
                             //  If input stream is closed and disposed already dont finish reading the stream
@@ -164,6 +180,7 @@ namespace Renci.SshNet
 
                         if (asyncResult.IsCompleted)
                             continue;
+#endif // FEATURE_STREAM_ASYNC_TPL
                         break;
                     }
                 }
@@ -242,7 +259,7 @@ namespace Renci.SshNet
             if (Stopping != null)
             {
                 //  Handle event on different thread
-                ExecuteThread(() => Stopping(this, new EventArgs()));
+                ThreadAbstraction.ExecuteThread(() => Stopping(this, new EventArgs()));
             }
 
             if (_channel.IsOpen)
@@ -268,14 +285,12 @@ namespace Renci.SshNet
             if (Stopped != null)
             {
                 //  Handle event on different thread
-                ExecuteThread(() => Stopped(this, new EventArgs()));
+                ThreadAbstraction.ExecuteThread(() => Stopped(this, new EventArgs()));
             }
 
             _channel = null;
         }
 
-        partial void ExecuteThread(Action action);
-
         #region IDisposable Members
 
         private bool _disposed;

+ 0 - 20
src/Renci.SshNet/ShellStream.NET40.cs

@@ -1,20 +0,0 @@
-using System;
-using System.Threading;
-
-namespace Renci.SshNet
-{
-    /// <summary>
-    /// Represents instance of the SSH shell object
-    /// </summary>
-    public partial class ShellStream
-    {
-        /// <summary>
-        /// Executes the specified action in a separate thread.
-        /// </summary>
-        /// <param name="action">The action to execute.</param>
-        partial void ExecuteThread(Action action)
-        {
-            ThreadPool.QueueUserWorkItem(o => action());
-        }
-    }
-}

+ 2 - 3
src/Renci.SshNet/ShellStream.cs

@@ -7,6 +7,7 @@ using Renci.SshNet.Channels;
 using Renci.SshNet.Common;
 using System.Threading;
 using System.Text.RegularExpressions;
+using Renci.SshNet.Abstractions;
 
 namespace Renci.SshNet
 {
@@ -363,7 +364,7 @@ namespace Renci.SshNet
             var asyncResult = new ExpectAsyncResult(callback, state);
 
             //  Execute callback on different thread
-            ExecuteThread(() =>
+            ThreadAbstraction.ExecuteThread(() =>
             {
                 string expectActionResult = null;
                 try
@@ -687,8 +688,6 @@ namespace Renci.SshNet
             }
         }
 
-        partial void ExecuteThread(Action action);
-
         private void Session_ErrorOccured(object sender, ExceptionEventArgs e)
         {
             OnRaiseError(e);

+ 0 - 20
src/Renci.SshNet/SshCommand.NET40.cs

@@ -1,20 +0,0 @@
-using System;
-using System.Threading;
-
-namespace Renci.SshNet
-{
-    /// <summary>
-    /// Represents SSH command that can be executed.
-    /// </summary>
-    public partial class SshCommand 
-    {
-        /// <summary>
-        /// Executes the specified action in a separate thread.
-        /// </summary>
-        /// <param name="action">The action to execute.</param>
-        partial void ExecuteThread(Action action)
-        {
-            ThreadPool.QueueUserWorkItem(o => action());
-        }
-    }
-}

+ 2 - 3
src/Renci.SshNet/SshCommand.cs

@@ -8,6 +8,7 @@ using Renci.SshNet.Messages;
 using Renci.SshNet.Messages.Connection;
 using Renci.SshNet.Messages.Transport;
 using System.Globalization;
+using Renci.SshNet.Abstractions;
 
 namespace Renci.SshNet
 {
@@ -416,7 +417,7 @@ namespace Renci.SshNet
             if (this._callback != null)
             {
                 //  Execute callback on different thread
-                this.ExecuteThread(() => this._callback(this._asyncResult));
+                ThreadAbstraction.ExecuteThread(() => this._callback(this._asyncResult));
             }
             ((EventWaitHandle)this._asyncResult.AsyncWaitHandle).Set();
         }
@@ -507,8 +508,6 @@ namespace Renci.SshNet
             _channel.Dispose();
         }
 
-        partial void ExecuteThread(Action action);
-
         #region IDisposable Members
 
         private bool _isDisposed;