Skip to content

Commit

Permalink
Merge pull request #80 from SuessLabs/feature/Issue-79-SupportVS17.9
Browse files Browse the repository at this point in the history
Visual Studio v17.9.x support
  • Loading branch information
DamianSuess authored Mar 8, 2024
2 parents 8865ad0 + 7adbfdb commit c07733b
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 188 deletions.
3 changes: 3 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,6 @@ To contribute, please pick off an item from the project or issue page. We'd love
* [Extension Docs](https://docs.microsoft.com/en-us/visualstudio/extensibility/creating-a-settings-category?view=vs-2022)
* [Extension Sample](https://github.com/microsoft/VSSDK-Extensibility-Samples/tree/master/Options)
* [Offroad Debugging](https://github.com/Microsoft/MIEngine/wiki/Offroad-Debugging-of-.NET-Core-on-Linux---OSX-from-Visual-Studio)


_Copyright 2024 Xeno Innovations, Inc._
14 changes: 14 additions & 0 deletions release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@

This document contains the release information for the project.

### 2.2.0

* Fixed: Support VS v17.9 (#79)
* Update: SSH.NET to v2023.0.1

### 2.1.1

* Update: Version 2.1 and Code Housekeeping by @DamianSuess in #65
* Update: GUI .NET 6 Sample NuGet packages by @DamianSuess in #68
* Update: PR Template by @DamianSuess in #69
* Update: Release build generator script by @DamianSuess in #70
* Update: Quality control by @DamianSuess in #74
* Update: Upgrade github actions by @DamianSuess in #75

### 2.1

* Update: Code cleanup
Expand Down
65 changes: 0 additions & 65 deletions src/VsLinuxDebugger/Core/Security/RsaSha256DigitalSignature.cs

This file was deleted.

63 changes: 0 additions & 63 deletions src/VsLinuxDebugger/Core/Security/RsaSha256Util.cs

This file was deleted.

31 changes: 0 additions & 31 deletions src/VsLinuxDebugger/Core/Security/RsaWithSha256SignatureKey.cs

This file was deleted.

37 changes: 18 additions & 19 deletions src/VsLinuxDebugger/Core/SshTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@
using Renci.SshNet.Common;
using SharpCompress.Common;
using SharpCompress.Writers;
using VsLinuxDebugger.Core.Security;

namespace VsLinuxDebugger.Core
{
public class SshTool : IDisposable
{
private readonly string _tarGzFileName = "vsldBuildContents.tar.gz";

private bool _isConnected = false;
private SshConnectionInfo _info;
private bool _isConnected = false;
private ScpClient _scp;
private SftpClient _sftp;
private SshClient _ssh;
Expand Down Expand Up @@ -157,22 +156,25 @@ public async Task CleanFolderAsync(string path)
public async Task<bool> ConnectAsync()
{
PrivateKeyFile keyFile = null;
ConnectionInfo conn = null;
ConnectionInfo connInfo = null;
try
{
if (_info.PrivateKeyEnabled)
{
Logger.Output($"SSH configuring private key connection...");

if (string.IsNullOrEmpty(_info.PrivateKeyPassword))
keyFile = new PrivateKeyFile(_info.PrivateKeyPath);
else
keyFile = new PrivateKeyFile(_info.PrivateKeyPath, _info.PrivateKeyPassword);

/**
// adds rsa-sha2-256
RsaSha256Util.ConvertToKeyWithSha256Signature(keyFile);
var authenticationMethodRsa = new PrivateKeyAuthenticationMethod(_info.UserName, keyFile);
conn = new ConnectionInfo(_info.Host, _info.Port, _info.UserName, authenticationMethodRsa);
RsaSha256Util.SetupConnection(conn);

connInfo = new ConnectionInfo(_info.Host, _info.Port, _info.UserName, authenticationMethodRsa);
RsaSha256Util.SetupConnection(connInfo);
*/
}
}
catch (Exception ex)
Expand All @@ -184,10 +186,10 @@ public async Task<bool> ConnectAsync()

try
{
if (_info.PrivateKeyEnabled && File.Exists(_info.PrivateKeyPath))
_ssh = new SshClient(conn);
else
_ssh = new SshClient(_info.Host, _info.Port, _info.UserName, _info.UserPass);
Logger.Output($"SSH connecting...");
_ssh = (_info.PrivateKeyEnabled && File.Exists(_info.PrivateKeyPath))
? new SshClient(_info.Host, _info.Port, _info.UserName, keyFile)
: new SshClient(_info.Host, _info.Port, _info.UserName, _info.UserPass);

await Task.Run(() => _ssh.Connect());
}
Expand All @@ -199,20 +201,17 @@ public async Task<bool> ConnectAsync()

try
{
if (_info.PrivateKeyEnabled && File.Exists(_info.PrivateKeyPath))
_sftp = new SftpClient(conn);
else
_sftp = new SftpClient(_info.Host, _info.Port, _info.UserName, _info.UserPass);
_sftp = (_info.PrivateKeyEnabled && File.Exists(_info.PrivateKeyPath))
? new SftpClient(connInfo)
: new SftpClient(_info.Host, _info.Port, _info.UserName, _info.UserPass);

_sftp.Connect();

}
catch (Exception)
{
if (_info.PrivateKeyEnabled && File.Exists(_info.PrivateKeyPath))
_scp = new ScpClient(conn);
else
_scp = new ScpClient(_info.Host, _info.Port, _info.UserName, _info.UserPass);
_scp = (_info.PrivateKeyEnabled && File.Exists(_info.PrivateKeyPath))
? new ScpClient(connInfo)
: new ScpClient(_info.Host, _info.Port, _info.UserName, _info.UserPass);

_scp.Connect();
}
Expand Down
7 changes: 3 additions & 4 deletions src/VsLinuxDebugger/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
Expand All @@ -10,7 +9,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Xeno Innovations, Inc.")]
[assembly: AssemblyProduct("VS Linux Debugger")]
[assembly: AssemblyCopyright("Copyright 2022-2023 Xeno Innovations, Inc.")]
[assembly: AssemblyCopyright("Copyright 2022-2024 Xeno Innovations, Inc.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -29,5 +28,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.1.1.3")]
[assembly: AssemblyFileVersion("2.1.1.3")]
[assembly: AssemblyVersion("2.2.0.0")]
[assembly: AssemblyFileVersion("2.2.0.0")]
5 changes: 1 addition & 4 deletions src/VsLinuxDebugger/VsLinuxDebugger.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@
<Compile Include="Core\LinuxPath.cs" />
<Compile Include="Core\RemoteDebugger.cs" />
<Compile Include="Core\LaunchBuilder.cs" />
<Compile Include="Core\Security\RsaSha256DigitalSignature.cs" />
<Compile Include="Core\Security\RsaSha256Util.cs" />
<Compile Include="Core\Security\RsaWithSha256SignatureKey.cs" />
<Compile Include="Core\SshConnectionInfo.cs" />
<Compile Include="Core\Remote\Configuration.cs" />
<Compile Include="Core\Remote\Launch.cs" />
Expand Down Expand Up @@ -104,7 +101,7 @@
<Version>0.30.1</Version>
</PackageReference>
<PackageReference Include="SSH.NET">
<Version>2020.0.2</Version>
<Version>2023.0.1</Version>
</PackageReference>
<PackageReference Include="System.Text.Json">
<Version>6.0.2</Version>
Expand Down
4 changes: 2 additions & 2 deletions src/VsLinuxDebugger/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="VsLinuxDebugger.4d7bf4de-5015-4e24-92c0-7f9f3397b2da"
Version="2.1.1"
Version="2.2.0"
Language="en-US"
Publisher="Suess Labs" />
<DisplayName>VS Linux Debugger</DisplayName>
Expand All @@ -14,7 +14,7 @@
<GettingStartedGuide>..\..\readme.md</GettingStartedGuide>
<ReleaseNotes>..\..\release-notes.md</ReleaseNotes>
<Icon>Resources\TuxDebug.png</Icon>
<Tags>debug; build; remote debug; vsdbg; linux; xamarin; rpi; rpi4; remotedebug; remote; debugger; linux debug; net6; dotnet; raspberry pi; ubuntu;</Tags>
<Tags>debug; build; remote debug; vsdbg; linux; xamarin; rpi; rpi4; remotedebug; remote; debugger; linux debug; net6; dotnet; raspberry pi; ubuntu; suess; suess-labs; xeno-innovations</Tags>
</Metadata>
<Installation>
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[17.0, 18.0)">
Expand Down

0 comments on commit c07733b

Please sign in to comment.