From 9f03fcd1bf17c1368756e8bfb2cbee4dd4a9132f Mon Sep 17 00:00:00 2001 From: HeeJae Chang Date: Thu, 5 Sep 2019 14:46:19 -0700 Subject: [PATCH] moved VS SDK to new version and supressed newly added analyzers from new VS SDK --- eng/Versions.props | 2 +- eng/config/rulesets/Shipping.ruleset | 2 ++ src/Test/Diagnostics/RemoteHost/RemoteHostPanel.xaml.cs | 4 ++++ .../VisualStudioWorkspaceStatusServiceFactory.cs | 9 ++++++++- src/VisualStudio/LiveShare/Impl/DiagnosticHandler.cs | 2 ++ .../Telemetry/TelemetryPanel.xaml.cs | 2 ++ 6 files changed, 19 insertions(+), 2 deletions(-) diff --git a/eng/Versions.props b/eng/Versions.props index c744b037239..a6f9d568f0e 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -88,7 +88,7 @@ 2.0.0-alpha-20170405-2 0.1.0 0.1.2-dev - 1.3.23 + 2.0.48 10.1.0 15.8.27812-alpha 15.8.27812-alpha diff --git a/eng/config/rulesets/Shipping.ruleset b/eng/config/rulesets/Shipping.ruleset index cc58675dfba..97842fef716 100644 --- a/eng/config/rulesets/Shipping.ruleset +++ b/eng/config/rulesets/Shipping.ruleset @@ -53,6 +53,7 @@ + @@ -163,6 +164,7 @@ + diff --git a/src/Test/Diagnostics/RemoteHost/RemoteHostPanel.xaml.cs b/src/Test/Diagnostics/RemoteHost/RemoteHostPanel.xaml.cs index 1319b15fa91..6533b95c723 100644 --- a/src/Test/Diagnostics/RemoteHost/RemoteHostPanel.xaml.cs +++ b/src/Test/Diagnostics/RemoteHost/RemoteHostPanel.xaml.cs @@ -27,7 +27,9 @@ public RemoteHostPanel(Workspace workspace) : this() _workspace = workspace; } +#pragma warning disable VSTHRD100 // Avoid async void methods private async void OnSolutionSave(object sender, RoutedEventArgs e) +#pragma warning restore VSTHRD100 // Avoid async void methods { using (Disable(SolutionSaveButton)) { @@ -66,7 +68,9 @@ private void OnFileToSave(object sender, RoutedEventArgs e) } } +#pragma warning disable VSTHRD100 // Avoid async void methods private async void OnSolutionOpen(object sender, RoutedEventArgs e) +#pragma warning restore VSTHRD100 // Avoid async void methods { using (Disable(SolutionOpenButton)) { diff --git a/src/VisualStudio/Core/Def/Implementation/Workspace/VisualStudioWorkspaceStatusServiceFactory.cs b/src/VisualStudio/Core/Def/Implementation/Workspace/VisualStudioWorkspaceStatusServiceFactory.cs index 973ba991c9d..3e704a327ca 100644 --- a/src/VisualStudio/Core/Def/Implementation/Workspace/VisualStudioWorkspaceStatusServiceFactory.cs +++ b/src/VisualStudio/Core/Def/Implementation/Workspace/VisualStudioWorkspaceStatusServiceFactory.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; +using System.ComponentModel; using System.Composition; using System.Threading; using System.Threading.Tasks; @@ -143,7 +144,13 @@ private async Task EnsureInitializationAsync(CancellationToken cancellationToken return; } - status.PropertyChanged += (_, e) => this.StatusChanged?.Invoke(this, EventArgs.Empty); + var notification = status as INotifyPropertyChanged; + if (notification == null) + { + + } + + notification.PropertyChanged += (_, e) => this.StatusChanged?.Invoke(this, EventArgs.Empty); } } } diff --git a/src/VisualStudio/LiveShare/Impl/DiagnosticHandler.cs b/src/VisualStudio/LiveShare/Impl/DiagnosticHandler.cs index eb19a2c91b3..ce439206cb3 100644 --- a/src/VisualStudio/LiveShare/Impl/DiagnosticHandler.cs +++ b/src/VisualStudio/LiveShare/Impl/DiagnosticHandler.cs @@ -35,7 +35,9 @@ public DiagnosticsHandler(IDiagnosticService diagnosticService) _diagnosticService.DiagnosticsUpdated += DiagnosticService_DiagnosticsUpdated; } +#pragma warning disable VSTHRD100 // Avoid async void methods private async void DiagnosticService_DiagnosticsUpdated(object sender, DiagnosticsUpdatedArgs e) +#pragma warning restore VSTHRD100 // Avoid async void methods { // Since this is an async void method, exceptions here will crash the host VS. We catch exceptions here to make sure that we don't crash the host since // the worst outcome here is that guests may not see all diagnostics. diff --git a/src/VisualStudio/VisualStudioDiagnosticsToolWindow/Telemetry/TelemetryPanel.xaml.cs b/src/VisualStudio/VisualStudioDiagnosticsToolWindow/Telemetry/TelemetryPanel.xaml.cs index e7d05c35dfe..37906f84135 100644 --- a/src/VisualStudio/VisualStudioDiagnosticsToolWindow/Telemetry/TelemetryPanel.xaml.cs +++ b/src/VisualStudio/VisualStudioDiagnosticsToolWindow/Telemetry/TelemetryPanel.xaml.cs @@ -25,7 +25,9 @@ public TelemetryPanel() InitializeComponent(); } +#pragma warning disable VSTHRD100 // Avoid async void methods private async void OnDump(object sender, RoutedEventArgs e) +#pragma warning restore VSTHRD100 // Avoid async void methods { using (Disable(DumpButton)) using (Disable(CopyButton)) -- GitLab