diff --git a/Directory.Packages.props b/Directory.Packages.props index d854d6c51..8af5dd2ec 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -13,6 +13,18 @@ + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + @@ -22,4 +34,4 @@ - + \ No newline at end of file diff --git a/src/PowerShellEditorServices.Hosting/Configuration/HostLogger.cs b/src/PowerShellEditorServices.Hosting/Configuration/HostLogger.cs index bebb7e2b9..1c8617341 100644 --- a/src/PowerShellEditorServices.Hosting/Configuration/HostLogger.cs +++ b/src/PowerShellEditorServices.Hosting/Configuration/HostLogger.cs @@ -214,7 +214,6 @@ public void LogException( /// The PowerShell host user interface object to log output to. internal class PSHostLogger(PSHostUserInterface ui) : IObserver<(PsesLogLevel logLevel, string message)> { - public void OnCompleted() { // No-op since there's nothing to close or dispose, diff --git a/src/PowerShellEditorServices.Hosting/PowerShellEditorServices.Hosting.csproj b/src/PowerShellEditorServices.Hosting/PowerShellEditorServices.Hosting.csproj index 7b73ff8a8..1c30a93df 100644 --- a/src/PowerShellEditorServices.Hosting/PowerShellEditorServices.Hosting.csproj +++ b/src/PowerShellEditorServices.Hosting/PowerShellEditorServices.Hosting.csproj @@ -1,5 +1,6 @@  - + net8.0;net462 @@ -16,6 +17,12 @@ + + + + + + diff --git a/src/PowerShellEditorServices/Logging/LanguageServerLogger.cs b/src/PowerShellEditorServices/Logging/LanguageServerLogger.cs index 0b22ddd95..5d368f912 100644 --- a/src/PowerShellEditorServices/Logging/LanguageServerLogger.cs +++ b/src/PowerShellEditorServices/Logging/LanguageServerLogger.cs @@ -137,7 +137,6 @@ internal class LanguageServerLoggerProvider(ILanguageServerFacade languageServer public void Dispose() { } } - public static class LanguageServerLoggerExtensions { /// diff --git a/src/PowerShellEditorServices/PowerShellEditorServices.csproj b/src/PowerShellEditorServices/PowerShellEditorServices.csproj index bf90a93ae..18948aabc 100644 --- a/src/PowerShellEditorServices/PowerShellEditorServices.csproj +++ b/src/PowerShellEditorServices/PowerShellEditorServices.csproj @@ -1,5 +1,6 @@ - + PowerShell Editor Services @@ -41,6 +42,12 @@ + + + + + + diff --git a/src/PowerShellEditorServices/Services/DebugAdapter/Handlers/LaunchAndAttachHandler.cs b/src/PowerShellEditorServices/Services/DebugAdapter/Handlers/LaunchAndAttachHandler.cs index 97bd6cca7..67b2c1021 100644 --- a/src/PowerShellEditorServices/Services/DebugAdapter/Handlers/LaunchAndAttachHandler.cs +++ b/src/PowerShellEditorServices/Services/DebugAdapter/Handlers/LaunchAndAttachHandler.cs @@ -301,7 +301,6 @@ void RunspaceChangedHandler(object s, RunspaceChangedEventArgs _) throw new RpcErrorException(0, null, "Invalid configuration with no process ID nor custom pipe name!"); } - // Execute the Debug-Runspace command but don't await it because it // will block the debug adapter initialization process. The // InitializedEvent will be sent as soon as the RunspaceChanged @@ -328,7 +327,6 @@ void RunspaceChangedHandler(object s, RunspaceChangedEventArgs _) if (request.RunspaceId < 1) { - throw new RpcErrorException(0, null, "A positive integer must be specified for the RunspaceId!"); } diff --git a/src/PowerShellEditorServices/Services/DebugAdapter/Handlers/StackTraceHandler.cs b/src/PowerShellEditorServices/Services/DebugAdapter/Handlers/StackTraceHandler.cs index 84d23a8b6..858f6a815 100644 --- a/src/PowerShellEditorServices/Services/DebugAdapter/Handlers/StackTraceHandler.cs +++ b/src/PowerShellEditorServices/Services/DebugAdapter/Handlers/StackTraceHandler.cs @@ -128,6 +128,4 @@ public static StackFrame CreateStackFrame(StackFrameDetails stackFrame, long id) Column = invocationInfo.OffsetInLine, PresentationHint = StackFramePresentationHint.Label }; - } - diff --git a/src/PowerShellEditorServices/Services/DebugAdapter/Handlers/VariablesHandler.cs b/src/PowerShellEditorServices/Services/DebugAdapter/Handlers/VariablesHandler.cs index 58fb4d5ef..55c5f85ff 100644 --- a/src/PowerShellEditorServices/Services/DebugAdapter/Handlers/VariablesHandler.cs +++ b/src/PowerShellEditorServices/Services/DebugAdapter/Handlers/VariablesHandler.cs @@ -34,10 +34,12 @@ public async Task Handle(VariablesArguments request, Cancella .ToArray() }; } + #pragma warning disable RCS1075 catch (Exception) { // TODO: This shouldn't be so broad } + #pragma warning restore RCS1075 return variablesResponse; } diff --git a/src/PowerShellEditorServices/Services/Workspace/Handlers/ConfigurationHandler.cs b/src/PowerShellEditorServices/Services/Workspace/Handlers/ConfigurationHandler.cs index a7f36aab1..2cfb57cd4 100644 --- a/src/PowerShellEditorServices/Services/Workspace/Handlers/ConfigurationHandler.cs +++ b/src/PowerShellEditorServices/Services/Workspace/Handlers/ConfigurationHandler.cs @@ -100,7 +100,6 @@ public override async Task Handle(DidChangeConfigurationParams request, Ca return await Unit.Task.ConfigureAwait(false); } - public event EventHandler ConfigurationUpdated; } } diff --git a/test/PowerShellEditorServices.Test.E2E/DebugAdapterProtocolMessageTests.cs b/test/PowerShellEditorServices.Test.E2E/DebugAdapterProtocolMessageTests.cs index bb794516f..523ced631 100644 --- a/test/PowerShellEditorServices.Test.E2E/DebugAdapterProtocolMessageTests.cs +++ b/test/PowerShellEditorServices.Test.E2E/DebugAdapterProtocolMessageTests.cs @@ -306,7 +306,6 @@ await PsesDebugAdapterClient.SetBreakpoints( await PsesDebugAdapterClient.RequestConfigurationDone(new ConfigurationDoneArguments()); await PsesDebugAdapterClient.LaunchScript(filePath, Started); - // Get the stacktrace for the breakpoint await Assert.ThrowsAsync(() => PsesDebugAdapterClient.RequestStackTrace( new StackTraceArguments { } diff --git a/test/PowerShellEditorServices.Test/Debugging/DebugServiceTests.cs b/test/PowerShellEditorServices.Test/Debugging/DebugServiceTests.cs index 05386d43a..d9656c855 100644 --- a/test/PowerShellEditorServices.Test/Debugging/DebugServiceTests.cs +++ b/test/PowerShellEditorServices.Test/Debugging/DebugServiceTests.cs @@ -76,7 +76,6 @@ public async Task InitializeAsync() variableScriptFile = GetDebugScript("VariableTest.ps1"); } - public async Task DisposeAsync() { debugService.Abort();