提交 9f03fcd1 编写于 作者: H HeeJae Chang

moved VS SDK to new version and supressed newly added analyzers from new VS SDK

上级 06e3133a
......@@ -88,7 +88,7 @@
<MicrosoftNetSdkVersion>2.0.0-alpha-20170405-2</MicrosoftNetSdkVersion>
<MicrosoftNuGetBuildTasksVersion>0.1.0</MicrosoftNuGetBuildTasksVersion>
<MicrosoftPortableTargetsVersion>0.1.2-dev</MicrosoftPortableTargetsVersion>
<MicrosoftServiceHubClientVersion>1.3.23</MicrosoftServiceHubClientVersion>
<MicrosoftServiceHubClientVersion>2.0.48</MicrosoftServiceHubClientVersion>
<MicrosoftVisualBasicVersion>10.1.0</MicrosoftVisualBasicVersion>
<MicrosoftVisualStudioCallHierarchyPackageDefinitionsVersion>15.8.27812-alpha</MicrosoftVisualStudioCallHierarchyPackageDefinitionsVersion>
<MicrosoftVisualStudioCodeAnalysisSdkUIVersion>15.8.27812-alpha</MicrosoftVisualStudioCodeAnalysisSdkUIVersion>
......
......@@ -53,6 +53,7 @@
<Rule Id="CA1822" Action="None" /> <!-- https://github.com/dotnet/roslyn/issues/25132: Enable rule CA1822 (Mark members as static) on Roslyn.sln -->
<Rule Id="CA1823" Action="None" /> <!-- https://github.com/dotnet/roslyn/issues/20404: Enable rule CA1823 (remove unused field) once we have a fixer for it -->
<Rule Id="CA1824" Action="None" /> <!-- mark assemblies with NeutralResourcesLanguageAttribute -->
<Rule Id="CA1827" Action="None" /> <!-- https://github.com/dotnet/roslyn/issues/37959: DoNotUseCountWhenAnyCanBeUsed -->
<Rule Id="CA2000" Action="None" /> <!-- https://github.com/dotnet/roslyn/issues/25880 -->
<Rule Id="CA2007" Action="Warning" />
<Rule Id="CA2211" Action="None" />
......@@ -163,6 +164,7 @@
<!-- https://github.com/Microsoft/VSSDK-Analyzers/blob/master/doc/index.md -->
<Rule Id="VSSDK001" Action="Warning" /> <!-- Derive from AsyncPackage -->
<Rule Id="VSSDK003" Action="Warning" /> <!-- Support async tool windows -->
<Rule Id="VSSDK006" Action="None" /> <!-- CheckServicesExistAnalyzer - Analyzer throws AD0001 for some projects -->
</Rules>
<Rules AnalyzerId="Microsoft.VisualStudio.Threading.Analyzers" RuleNamespace="Microsoft.VisualStudio.Threading.Analyzers">
<Rule Id="VSTHRD002" Action="None" /> <!-- Avoid problematic synchronous waits -->
......
......@@ -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))
{
......
// 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);
}
}
}
......
......@@ -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.
......
......@@ -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))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册