Skip to content

Commit a620835

Browse files
committed
Support our legacy target frameworks.
1 parent 68a47f6 commit a620835

File tree

8 files changed

+200
-10
lines changed

8 files changed

+200
-10
lines changed

src/Renci.SshNet.Silverlight/Renci.SshNet.Silverlight.csproj

+38-2
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,9 @@
203203
<Compile Include="..\Renci.SshNet\Common\Pack.cs">
204204
<Link>Common\Pack.cs</Link>
205205
</Compile>
206+
<Compile Include="..\Renci.SshNet\Common\PacketDump.cs">
207+
<Link>Common\PacketDump.cs</Link>
208+
</Compile>
206209
<Compile Include="..\Renci.SshNet\Common\PipeStream.cs">
207210
<Link>Common\PipeStream.cs</Link>
208211
</Compile>
@@ -278,6 +281,39 @@
278281
<Compile Include="..\Renci.SshNet\ConnectionInfo.cs">
279282
<Link>ConnectionInfo.cs</Link>
280283
</Compile>
284+
<Compile Include="..\Renci.SshNet\Connection\ConnectorBase.cs">
285+
<Link>Connection\ConnectorBase.cs</Link>
286+
</Compile>
287+
<Compile Include="..\Renci.SshNet\Connection\DirectConnector.cs">
288+
<Link>Connection\DirectConnector.cs</Link>
289+
</Compile>
290+
<Compile Include="..\Renci.SshNet\Connection\HttpConnector.cs">
291+
<Link>Connection\HttpConnector.cs</Link>
292+
</Compile>
293+
<Compile Include="..\Renci.SshNet\Connection\IConnector.cs">
294+
<Link>Connection\IConnector.cs</Link>
295+
</Compile>
296+
<Compile Include="..\Renci.SshNet\Connection\IProtocolVersionExchange.cs">
297+
<Link>Connection\IProtocolVersionExchange.cs</Link>
298+
</Compile>
299+
<Compile Include="..\Renci.SshNet\Connection\ISocketFactory.cs">
300+
<Link>Connection\ISocketFactory.cs</Link>
301+
</Compile>
302+
<Compile Include="..\Renci.SshNet\Connection\ProtocolVersionExchange.cs">
303+
<Link>Connection\ProtocolVersionExchange.cs</Link>
304+
</Compile>
305+
<Compile Include="..\Renci.SshNet\Connection\SocketFactory.cs">
306+
<Link>Connection\SocketFactory.cs</Link>
307+
</Compile>
308+
<Compile Include="..\Renci.SshNet\Connection\Socks4Connector.cs">
309+
<Link>Connection\Socks4Connector.cs</Link>
310+
</Compile>
311+
<Compile Include="..\Renci.SshNet\Connection\Socks5Connector.cs">
312+
<Link>Connection\Socks5Connector.cs</Link>
313+
</Compile>
314+
<Compile Include="..\Renci.SshNet\Connection\SshIdentification.cs">
315+
<Link>Connection\SshIdentification.cs</Link>
316+
</Compile>
281317
<Compile Include="..\Renci.SshNet\ExpectAction.cs">
282318
<Link>ExpectAction.cs</Link>
283319
</Compile>
@@ -1184,7 +1220,7 @@
11841220
<Compile Include="..\Renci.SshNet\SftpClient.cs">
11851221
<Link>SftpClient.cs</Link>
11861222
</Compile>
1187-
<Compile Include="..\Renci.SshNet\ISftpClient.cs">
1223+
<Compile Include="..\Renci.SshNet\ISftpClient.cs">
11881224
<Link>ISftpClient.cs</Link>
11891225
</Compile>
11901226
<Compile Include="..\Renci.SshNet\Sftp\Flags.cs">
@@ -1407,7 +1443,7 @@
14071443
<FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
14081444
<SilverlightProjectProperties />
14091445
</FlavorProperties>
1410-
<UserProperties ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" />
1446+
<UserProperties ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" />
14111447
</VisualStudio>
14121448
</ProjectExtensions>
14131449
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.

src/Renci.SshNet.Silverlight5/Renci.SshNet.Silverlight5.csproj

+38-2
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,9 @@
209209
<Compile Include="..\Renci.SshNet\Common\Pack.cs">
210210
<Link>Common\Pack.cs</Link>
211211
</Compile>
212+
<Compile Include="..\Renci.SshNet\Common\PacketDump.cs">
213+
<Link>Common\PacketDump.cs</Link>
214+
</Compile>
212215
<Compile Include="..\Renci.SshNet\Common\PipeStream.cs">
213216
<Link>Common\PipeStream.cs</Link>
214217
</Compile>
@@ -284,6 +287,39 @@
284287
<Compile Include="..\Renci.SshNet\ConnectionInfo.cs">
285288
<Link>ConnectionInfo.cs</Link>
286289
</Compile>
290+
<Compile Include="..\Renci.SshNet\Connection\ConnectorBase.cs">
291+
<Link>Connection\ConnectorBase.cs</Link>
292+
</Compile>
293+
<Compile Include="..\Renci.SshNet\Connection\DirectConnector.cs">
294+
<Link>Connection\DirectConnector.cs</Link>
295+
</Compile>
296+
<Compile Include="..\Renci.SshNet\Connection\HttpConnector.cs">
297+
<Link>Connection\HttpConnector.cs</Link>
298+
</Compile>
299+
<Compile Include="..\Renci.SshNet\Connection\IConnector.cs">
300+
<Link>Connection\IConnector.cs</Link>
301+
</Compile>
302+
<Compile Include="..\Renci.SshNet\Connection\IProtocolVersionExchange.cs">
303+
<Link>Connection\IProtocolVersionExchange.cs</Link>
304+
</Compile>
305+
<Compile Include="..\Renci.SshNet\Connection\ISocketFactory.cs">
306+
<Link>Connection\ISocketFactory.cs</Link>
307+
</Compile>
308+
<Compile Include="..\Renci.SshNet\Connection\ProtocolVersionExchange.cs">
309+
<Link>Connection\ProtocolVersionExchange.cs</Link>
310+
</Compile>
311+
<Compile Include="..\Renci.SshNet\Connection\SocketFactory.cs">
312+
<Link>Connection\SocketFactory.cs</Link>
313+
</Compile>
314+
<Compile Include="..\Renci.SshNet\Connection\Socks4Connector.cs">
315+
<Link>Connection\Socks4Connector.cs</Link>
316+
</Compile>
317+
<Compile Include="..\Renci.SshNet\Connection\Socks5Connector.cs">
318+
<Link>Connection\Socks5Connector.cs</Link>
319+
</Compile>
320+
<Compile Include="..\Renci.SshNet\Connection\SshIdentification.cs">
321+
<Link>Connection\SshIdentification.cs</Link>
322+
</Compile>
287323
<Compile Include="..\Renci.SshNet\ExpectAction.cs">
288324
<Link>ExpectAction.cs</Link>
289325
</Compile>
@@ -1190,7 +1226,7 @@
11901226
<Compile Include="..\Renci.SshNet\SftpClient.cs">
11911227
<Link>SftpClient.cs</Link>
11921228
</Compile>
1193-
<Compile Include="..\Renci.SshNet\ISftpClient.cs">
1229+
<Compile Include="..\Renci.SshNet\ISftpClient.cs">
11941230
<Link>ISftpClient.cs</Link>
11951231
</Compile>
11961232
<Compile Include="..\Renci.SshNet\Sftp\Flags.cs">
@@ -1411,7 +1447,7 @@
14111447
<FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
14121448
<SilverlightProjectProperties />
14131449
</FlavorProperties>
1414-
<UserProperties ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" />
1450+
<UserProperties ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" />
14151451
</VisualStudio>
14161452
</ProjectExtensions>
14171453
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.

src/Renci.SshNet.UAP10/Renci.SshNet.UAP10.csproj

+36
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,9 @@
252252
<Compile Include="..\Renci.SshNet\Common\Pack.cs">
253253
<Link>Common\Pack.cs</Link>
254254
</Compile>
255+
<Compile Include="..\Renci.SshNet\Common\PacketDump.cs">
256+
<Link>Common\PacketDump.cs</Link>
257+
</Compile>
255258
<Compile Include="..\Renci.SshNet\Common\PipeStream.cs">
256259
<Link>Common\PipeStream.cs</Link>
257260
</Compile>
@@ -327,6 +330,39 @@
327330
<Compile Include="..\Renci.SshNet\ConnectionInfo.cs">
328331
<Link>ConnectionInfo.cs</Link>
329332
</Compile>
333+
<Compile Include="..\Renci.SshNet\Connection\ConnectorBase.cs">
334+
<Link>Connection\ConnectorBase.cs</Link>
335+
</Compile>
336+
<Compile Include="..\Renci.SshNet\Connection\DirectConnector.cs">
337+
<Link>Connection\DirectConnector.cs</Link>
338+
</Compile>
339+
<Compile Include="..\Renci.SshNet\Connection\HttpConnector.cs">
340+
<Link>Connection\HttpConnector.cs</Link>
341+
</Compile>
342+
<Compile Include="..\Renci.SshNet\Connection\IConnector.cs">
343+
<Link>Connection\IConnector.cs</Link>
344+
</Compile>
345+
<Compile Include="..\Renci.SshNet\Connection\IProtocolVersionExchange.cs">
346+
<Link>Connection\IProtocolVersionExchange.cs</Link>
347+
</Compile>
348+
<Compile Include="..\Renci.SshNet\Connection\ISocketFactory.cs">
349+
<Link>Connection\ISocketFactory.cs</Link>
350+
</Compile>
351+
<Compile Include="..\Renci.SshNet\Connection\ProtocolVersionExchange.cs">
352+
<Link>Connection\ProtocolVersionExchange.cs</Link>
353+
</Compile>
354+
<Compile Include="..\Renci.SshNet\Connection\SocketFactory.cs">
355+
<Link>Connection\SocketFactory.cs</Link>
356+
</Compile>
357+
<Compile Include="..\Renci.SshNet\Connection\Socks4Connector.cs">
358+
<Link>Connection\Socks4Connector.cs</Link>
359+
</Compile>
360+
<Compile Include="..\Renci.SshNet\Connection\Socks5Connector.cs">
361+
<Link>Connection\Socks5Connector.cs</Link>
362+
</Compile>
363+
<Compile Include="..\Renci.SshNet\Connection\SshIdentification.cs">
364+
<Link>Connection\SshIdentification.cs</Link>
365+
</Compile>
330366
<Compile Include="..\Renci.SshNet\ExpectAction.cs">
331367
<Link>ExpectAction.cs</Link>
332368
</Compile>

src/Renci.SshNet.WindowsPhone/Renci.SshNet.WindowsPhone.csproj

+37-1
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,9 @@
191191
<Compile Include="..\Renci.SshNet\Common\Pack.cs">
192192
<Link>Common\Pack.cs</Link>
193193
</Compile>
194+
<Compile Include="..\Renci.SshNet\Common\PacketDump.cs">
195+
<Link>Common\PacketDump.cs</Link>
196+
</Compile>
194197
<Compile Include="..\Renci.SshNet\Common\PipeStream.cs">
195198
<Link>Common\PipeStream.cs</Link>
196199
</Compile>
@@ -266,6 +269,39 @@
266269
<Compile Include="..\Renci.SshNet\ConnectionInfo.cs">
267270
<Link>ConnectionInfo.cs</Link>
268271
</Compile>
272+
<Compile Include="..\Renci.SshNet\Connection\ConnectorBase.cs">
273+
<Link>Connection\ConnectorBase.cs</Link>
274+
</Compile>
275+
<Compile Include="..\Renci.SshNet\Connection\DirectConnector.cs">
276+
<Link>Connection\DirectConnector.cs</Link>
277+
</Compile>
278+
<Compile Include="..\Renci.SshNet\Connection\HttpConnector.cs">
279+
<Link>Connection\HttpConnector.cs</Link>
280+
</Compile>
281+
<Compile Include="..\Renci.SshNet\Connection\IConnector.cs">
282+
<Link>Connection\IConnector.cs</Link>
283+
</Compile>
284+
<Compile Include="..\Renci.SshNet\Connection\IProtocolVersionExchange.cs">
285+
<Link>Connection\IProtocolVersionExchange.cs</Link>
286+
</Compile>
287+
<Compile Include="..\Renci.SshNet\Connection\ISocketFactory.cs">
288+
<Link>Connection\ISocketFactory.cs</Link>
289+
</Compile>
290+
<Compile Include="..\Renci.SshNet\Connection\ProtocolVersionExchange.cs">
291+
<Link>Connection\ProtocolVersionExchange.cs</Link>
292+
</Compile>
293+
<Compile Include="..\Renci.SshNet\Connection\SocketFactory.cs">
294+
<Link>Connection\SocketFactory.cs</Link>
295+
</Compile>
296+
<Compile Include="..\Renci.SshNet\Connection\Socks4Connector.cs">
297+
<Link>Connection\Socks4Connector.cs</Link>
298+
</Compile>
299+
<Compile Include="..\Renci.SshNet\Connection\Socks5Connector.cs">
300+
<Link>Connection\Socks5Connector.cs</Link>
301+
</Compile>
302+
<Compile Include="..\Renci.SshNet\Connection\SshIdentification.cs">
303+
<Link>Connection\SshIdentification.cs</Link>
304+
</Compile>
269305
<Compile Include="..\Renci.SshNet\ExpectAction.cs">
270306
<Link>ExpectAction.cs</Link>
271307
</Compile>
@@ -1169,7 +1205,7 @@
11691205
<Compile Include="..\Renci.SshNet\SftpClient.cs">
11701206
<Link>SftpClient.cs</Link>
11711207
</Compile>
1172-
<Compile Include="..\Renci.SshNet\ISftpClient.cs">
1208+
<Compile Include="..\Renci.SshNet\ISftpClient.cs">
11731209
<Link>ISftpClient.cs</Link>
11741210
</Compile>
11751211
<Compile Include="..\Renci.SshNet\Sftp\Flags.cs">

src/Renci.SshNet.WindowsPhone8/Renci.SshNet.WindowsPhone8.csproj

+37-1
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,9 @@
232232
<Compile Include="..\Renci.SshNet\Common\Pack.cs">
233233
<Link>Common\Pack.cs</Link>
234234
</Compile>
235+
<Compile Include="..\Renci.SshNet\Common\PacketDump.cs">
236+
<Link>Common\PacketDump.cs</Link>
237+
</Compile>
235238
<Compile Include="..\Renci.SshNet\Common\PipeStream.cs">
236239
<Link>Common\PipeStream.cs</Link>
237240
</Compile>
@@ -307,6 +310,39 @@
307310
<Compile Include="..\Renci.SshNet\ConnectionInfo.cs">
308311
<Link>ConnectionInfo.cs</Link>
309312
</Compile>
313+
<Compile Include="..\Renci.SshNet\Connection\ConnectorBase.cs">
314+
<Link>Connection\ConnectorBase.cs</Link>
315+
</Compile>
316+
<Compile Include="..\Renci.SshNet\Connection\DirectConnector.cs">
317+
<Link>Connection\DirectConnector.cs</Link>
318+
</Compile>
319+
<Compile Include="..\Renci.SshNet\Connection\HttpConnector.cs">
320+
<Link>Connection\HttpConnector.cs</Link>
321+
</Compile>
322+
<Compile Include="..\Renci.SshNet\Connection\IConnector.cs">
323+
<Link>Connection\IConnector.cs</Link>
324+
</Compile>
325+
<Compile Include="..\Renci.SshNet\Connection\IProtocolVersionExchange.cs">
326+
<Link>Connection\IProtocolVersionExchange.cs</Link>
327+
</Compile>
328+
<Compile Include="..\Renci.SshNet\Connection\ISocketFactory.cs">
329+
<Link>Connection\ISocketFactory.cs</Link>
330+
</Compile>
331+
<Compile Include="..\Renci.SshNet\Connection\ProtocolVersionExchange.cs">
332+
<Link>Connection\ProtocolVersionExchange.cs</Link>
333+
</Compile>
334+
<Compile Include="..\Renci.SshNet\Connection\SocketFactory.cs">
335+
<Link>Connection\SocketFactory.cs</Link>
336+
</Compile>
337+
<Compile Include="..\Renci.SshNet\Connection\Socks4Connector.cs">
338+
<Link>Connection\Socks4Connector.cs</Link>
339+
</Compile>
340+
<Compile Include="..\Renci.SshNet\Connection\Socks5Connector.cs">
341+
<Link>Connection\Socks5Connector.cs</Link>
342+
</Compile>
343+
<Compile Include="..\Renci.SshNet\Connection\SshIdentification.cs">
344+
<Link>Connection\SshIdentification.cs</Link>
345+
</Compile>
310346
<Compile Include="..\Renci.SshNet\ExpectAction.cs">
311347
<Link>ExpectAction.cs</Link>
312348
</Compile>
@@ -1444,7 +1480,7 @@
14441480
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" />
14451481
<ProjectExtensions>
14461482
<VisualStudio>
1447-
<UserProperties ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" />
1483+
<UserProperties ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" />
14481484
</VisualStudio>
14491485
</ProjectExtensions>
14501486
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.

src/Renci.SshNet/Abstractions/SocketAbstraction.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -391,9 +391,9 @@ public static int Read(Socket socket, byte[] buffer, int offset, int size, TimeS
391391
{
392392
if (socket.ReceiveAsync(args))
393393
{
394-
if (!receiveCompleted.WaitOne(timeout))
394+
if (!receiveCompleted.WaitOne(readTimeout))
395395
throw new SshOperationTimeoutException(string.Format(CultureInfo.InvariantCulture,
396-
"Socket read operation has timed out after {0:F0} milliseconds.", timeout.TotalMilliseconds));
396+
"Socket read operation has timed out after {0:F0} milliseconds.", readTimeout.TotalMilliseconds));
397397
}
398398
else
399399
{

src/Renci.SshNet/Common/PacketDump.cs

+8-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,13 @@ private static string AsHex(byte[] data, int length)
7979

8080
private static string AsAscii(byte[] data, int length)
8181
{
82-
var ascii = new StringBuilder();
82+
#if FEATURE_ENCODING_ASCII
83+
var encoding = Encoding.ASCII;
84+
#else
85+
var encoding = new ASCIIEncoding();
86+
#endif
87+
88+
var ascii = new StringBuilder();
8389
const char dot = '.';
8490

8591
for (var i = 0; i < length; i++)
@@ -92,7 +98,7 @@ private static string AsAscii(byte[] data, int length)
9298
}
9399
else
94100
{
95-
ascii.Append(Encoding.ASCII.GetString(data, i, 1));
101+
ascii.Append(encoding.GetString(data, i, 1));
96102
}
97103
}
98104

src/Renci.SshNet/Connection/Socks4Connector.cs

+4
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,11 @@ private static byte[] GetProxyUserBytes(string proxyUser)
143143
return Array<byte>.Empty;
144144
}
145145

146+
#if FEATURE_ENCODING_ASCII
146147
return Encoding.ASCII.GetBytes(proxyUser);
148+
#else
149+
return new ASCIIEncoding().GetBytes(proxyUser);
150+
#endif
147151
}
148152
}
149153
}

0 commit comments

Comments
 (0)