diff --git a/src/Analyzers/build.sh b/src/Analyzers/build.sh old mode 100644 new mode 100755 diff --git a/src/Analyzers/shared/FeatureDetection/Microsoft.AspNetCore.Analyzers.FeatureDetection.Sources.csproj b/src/Analyzers/shared/FeatureDetection/Microsoft.AspNetCore.Analyzers.FeatureDetection.Sources.csproj deleted file mode 100644 index 1ec3645965..0000000000 --- a/src/Analyzers/shared/FeatureDetection/Microsoft.AspNetCore.Analyzers.FeatureDetection.Sources.csproj +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - netstandard1.0 - true - false - true - true - true - false - false - false - false - contentFiles - true - $(DefaultExcludeItems);$(BaseOutputPath);$(BaseIntermediateOutputPath); - $(NoWarn);CS8021 - false - - - - - True - lib - - - - true - $(ContentTargetFolders)\cs\netstandard1.0\shared\ - - - - - - %(FileName)%(Extension) - true - $(ContentTargetFolders)\cs\netstandard1.0\shared\ - - - %(FileName)%(Extension) - true - $(ContentTargetFolders)\cs\netstandard1.0\shared\ - - - %(FileName)%(Extension) - true - $(ContentTargetFolders)\cs\netstandard1.0\shared\ - - - %(FileName)%(Extension) - true - $(ContentTargetFolders)\cs\netstandard1.0\shared\ - - - %(FileName)%(Extension) - true - $(ContentTargetFolders)\cs\netstandard1.0\shared\ - - - %(FileName)%(Extension) - true - $(ContentTargetFolders)\cs\netstandard1.0\shared\ - - - - - - - - - diff --git a/src/Analyzers/shared/FeatureDetection/ProjectCompilationFeatureDetector.cs b/src/Analyzers/shared/FeatureDetection/ProjectCompilationFeatureDetector.cs deleted file mode 100644 index 9a92559a61..0000000000 --- a/src/Analyzers/shared/FeatureDetection/ProjectCompilationFeatureDetector.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) .NET Foundation. 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.Collections.Immutable; -using System.ComponentModel.Composition; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.CodeAnalysis; -using Microsoft.VisualStudio.LanguageServices; -using Microsoft.VisualStudio.Shell; -using Microsoft.VisualStudio.Threading; -using Task = System.Threading.Tasks.Task; - -namespace Microsoft.AspNetCore.Analyzers.FeatureDetection -{ - // Be very careful making changes to this file. No project in this repo builds it. - // - // If you need to verify a change, make a local project (net472) and copy in everything included by this project. - // - // You'll also need some nuget packages like: - // - Microsoft.VisualStudio.LanguageServices - // - Microsoft.VisualStudio.Shell.15.0 - // - Microsoft.VisualStudio.Threading - [Export(typeof(ProjectCompilationFeatureDetector))] - internal class ProjectCompilationFeatureDetector - { - private readonly Lazy _workspace; - - [ImportingConstructor] - public ProjectCompilationFeatureDetector(Lazy workspace) - { - _workspace = workspace; - } - - public async Task> DetectFeaturesAsync(string projectFullPath, CancellationToken cancellationToken = default) - { - if (projectFullPath == null) - { - throw new ArgumentNullException(nameof(projectFullPath)); - } - - // If the workspace is uninitialized, we need to do the first access on the UI thread. - // - // This is very unlikely to occur, but doing it here for completeness. - if (!_workspace.IsValueCreated) - { - await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); - GC.KeepAlive(_workspace.Value); - await TaskScheduler.Default; - } - - var workspace = _workspace.Value; - var solution = workspace.CurrentSolution; - - var project = GetProject(solution, projectFullPath); - if (project == null) - { - // Cannot find matching project. - return ImmutableHashSet.Empty; - } - - var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false); - return await CompilationFeatureDetector.DetectFeaturesAsync(compilation, cancellationToken); - } - - private static Project GetProject(Solution solution, string projectFilePath) - { - foreach (var project in solution.Projects) - { - if (string.Equals(projectFilePath, project.FilePath, StringComparison.OrdinalIgnoreCase)) - { - return project; - } - } - - return null; - } - } -} diff --git a/src/Analyzers/shared/FeatureDetection/lib/netstandard1.0/_._ b/src/Analyzers/shared/FeatureDetection/lib/netstandard1.0/_._ deleted file mode 100644 index e69de29bb2..0000000000