From c6012415b1c284748484f73f0dea71c89a7281d8 Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Fri, 24 Jul 2015 13:50:40 -0700 Subject: [PATCH] Add analyzer loading support for CoreCLR Adds a new type, CoreClrAnalyzerAssemblyLoader, that is responsible for finding and loading analyzer assemblies on CoreCLR. This is used in the CscCore and VbcCore CoreCLR-targeting projects. --- src/Compilers/CSharp/CscCore/CscCore.csproj | 7 +- src/Compilers/CSharp/CscCore/Program.cs | 3 +- src/Compilers/CSharp/CscCore/project.json | 3 +- .../CSharp/CscCore/project.lock.json | 52 ++++++ src/Compilers/CSharp/csc/csc.csproj | 5 +- .../Core/VBCSCompiler/VBCSCompiler.csproj | 3 + .../Helpers/AbstractAnalyzerAssemblyLoader.cs | 38 +--- .../Helpers/AnalyzerAssemblyLoadUtils.cs | 45 +++++ .../Helpers/CoreClrAnalyzerAssemblyLoader.cs | 163 ++++++++++++++++++ .../Helpers/NoOpAnalyzerAssemblyLoader.cs | 16 -- src/Compilers/VisualBasic/VbcCore/Program.cs | 2 +- .../VisualBasic/VbcCore/VbcCore.csproj | 7 +- .../VisualBasic/VbcCore/project.json | 3 +- .../VisualBasic/VbcCore/project.lock.json | 52 ++++++ src/Compilers/VisualBasic/vbc/vbc.csproj | 3 + .../Desktop/TestUtilities.Desktop.csproj | 5 +- .../Core/Desktop/Workspaces.Desktop.csproj | 5 +- 17 files changed, 349 insertions(+), 63 deletions(-) create mode 100644 src/Compilers/Helpers/AnalyzerAssemblyLoadUtils.cs create mode 100644 src/Compilers/Helpers/CoreClrAnalyzerAssemblyLoader.cs delete mode 100644 src/Compilers/Helpers/NoOpAnalyzerAssemblyLoader.cs diff --git a/src/Compilers/CSharp/CscCore/CscCore.csproj b/src/Compilers/CSharp/CscCore/CscCore.csproj index 89b6aeb3c75ab..a63658607565c 100644 --- a/src/Compilers/CSharp/CscCore/CscCore.csproj +++ b/src/Compilers/CSharp/CscCore/CscCore.csproj @@ -67,8 +67,11 @@ ConsoleUtil.cs - - ConsoleUtil.cs + + CoreClrAnalyzerAssemblyLoader.cs + + + AnalyzerAssemblyLoadUtils.cs diff --git a/src/Compilers/CSharp/CscCore/Program.cs b/src/Compilers/CSharp/CscCore/Program.cs index 0d02af32b7d6b..4729803d613a2 100644 --- a/src/Compilers/CSharp/CscCore/Program.cs +++ b/src/Compilers/CSharp/CscCore/Program.cs @@ -3,6 +3,7 @@ using System; using System.IO; using System.Runtime.InteropServices; +using Microsoft.CodeAnalysis; namespace Microsoft.CodeAnalysis.CSharp.CommandLine { @@ -12,6 +13,6 @@ public static int Main(string[] args) => Csc.Run(args: args, clientDirectory: AppContext.BaseDirectory, sdkDirectory: null, - analyzerLoader: new NoOpAnalyzerAssemblyLoader()); + analyzerLoader: CoreClrAnalyzerAssemblyLoader.CreateAndSetDefault()); } } diff --git a/src/Compilers/CSharp/CscCore/project.json b/src/Compilers/CSharp/CscCore/project.json index f49d49cad2744..3bbc7c9887493 100644 --- a/src/Compilers/CSharp/CscCore/project.json +++ b/src/Compilers/CSharp/CscCore/project.json @@ -23,8 +23,9 @@ "System.Runtime.Extensions": "4.0.11-beta-23321", "System.Runtime.Handles": "4.0.1-beta-23321", "System.Runtime.InteropServices": "4.0.21-beta-23321", - "System.Security.Cryptography.Hashing.Algorithms": "4.0.0-beta-23311", + "System.Runtime.Loader": "4.0.0-beta-23321", "System.Runtime.Serialization.Json": "4.0.1-beta-23321", + "System.Security.Cryptography.Hashing.Algorithms": "4.0.0-beta-23311", "System.Text.Encoding": "4.0.11-beta-23321", "System.Text.Encoding.Extensions": "4.0.11-beta-23321", "System.Threading": "4.0.11-beta-23321", diff --git a/src/Compilers/CSharp/CscCore/project.lock.json b/src/Compilers/CSharp/CscCore/project.lock.json index feaae53a73437..bf187a281700b 100644 --- a/src/Compilers/CSharp/CscCore/project.lock.json +++ b/src/Compilers/CSharp/CscCore/project.lock.json @@ -478,6 +478,19 @@ "lib/DNXCore50/System.Runtime.InteropServices.dll": {} } }, + "System.Runtime.Loader/4.0.0-beta-23321": { + "dependencies": { + "System.IO": "[4.0.0, )", + "System.Reflection": "[4.0.0, )", + "System.Runtime": "[4.0.0, )" + }, + "compile": { + "ref/dotnet/System.Runtime.Loader.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Runtime.Loader.dll": {} + } + }, "System.Runtime.Serialization.Json/4.0.1-beta-23321": { "dependencies": { "System.Private.DataContractSerialization": "[4.0.1-beta-23321, )" @@ -1391,6 +1404,19 @@ "lib/DNXCore50/System.Runtime.InteropServices.dll": {} } }, + "System.Runtime.Loader/4.0.0-beta-23321": { + "dependencies": { + "System.IO": "[4.0.0, )", + "System.Reflection": "[4.0.0, )", + "System.Runtime": "[4.0.0, )" + }, + "compile": { + "ref/dotnet/System.Runtime.Loader.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Runtime.Loader.dll": {} + } + }, "System.Runtime.Serialization.Json/4.0.1-beta-23321": { "dependencies": { "System.Private.DataContractSerialization": "[4.0.1-beta-23321, )" @@ -2466,6 +2492,19 @@ "lib/DNXCore50/System.Runtime.InteropServices.dll": {} } }, + "System.Runtime.Loader/4.0.0-beta-23321": { + "dependencies": { + "System.IO": "[4.0.0, )", + "System.Reflection": "[4.0.0, )", + "System.Runtime": "[4.0.0, )" + }, + "compile": { + "ref/dotnet/System.Runtime.Loader.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Runtime.Loader.dll": {} + } + }, "System.Runtime.Serialization.Json/4.0.1-beta-23321": { "dependencies": { "System.Private.DataContractSerialization": "[4.0.1-beta-23321, )" @@ -4581,6 +4620,18 @@ "System.Runtime.InteropServices.nuspec" ] }, + "System.Runtime.Loader/4.0.0-beta-23321": { + "sha512": "xyfQB/CKuzy/kaiMWtNgX16mMTsgt2ktdmG7COIXBFAkHUARSeBAjMOWkGdNWPzOWINYumqamA8JxGsQlPhuPQ==", + "type": "Package", + "files": [ + "[Content_Types].xml", + "_rels/.rels", + "lib/DNXCore50/System.Runtime.Loader.dll", + "package/services/metadata/core-properties/55d60ad8f5d24e06bf703dd426e1ec45.psmdcp", + "ref/dotnet/System.Runtime.Loader.dll", + "System.Runtime.Loader.nuspec" + ] + }, "System.Runtime.Serialization.Json/4.0.1-beta-23321": { "sha512": "TWQRwFnriFMykVgsCyowKFI5eLWoceMtoIrrx9Wd2ZL+XAnsdiYe8OUVeL9Q0kLVs3Ew12sPiXtY2wvVDAYR3w==", "type": "Package", @@ -5138,6 +5189,7 @@ "System.Runtime.Extensions >= 4.0.11-beta-23321", "System.Runtime.Handles >= 4.0.1-beta-23321", "System.Runtime.InteropServices >= 4.0.21-beta-23321", + "System.Runtime.Loader >= 4.0.0-beta-23321", "System.Runtime.Serialization.Json >= 4.0.1-beta-23321", "System.Security.Cryptography.Hashing.Algorithms >= 4.0.0-beta-23311", "System.Text.Encoding >= 4.0.11-beta-23321", diff --git a/src/Compilers/CSharp/csc/csc.csproj b/src/Compilers/CSharp/csc/csc.csproj index 24157b1d3e4e0..5a9d652e2e6da 100644 --- a/src/Compilers/CSharp/csc/csc.csproj +++ b/src/Compilers/CSharp/csc/csc.csproj @@ -53,6 +53,9 @@ AbstractAnalyzerAssemblyLoader.cs + + AnalyzerAssemblyLoadUtils.cs + ConsoleUtil.cs @@ -77,4 +80,4 @@ - \ No newline at end of file + diff --git a/src/Compilers/Core/VBCSCompiler/VBCSCompiler.csproj b/src/Compilers/Core/VBCSCompiler/VBCSCompiler.csproj index 920a3facb3732..80076cb30c166 100644 --- a/src/Compilers/Core/VBCSCompiler/VBCSCompiler.csproj +++ b/src/Compilers/Core/VBCSCompiler/VBCSCompiler.csproj @@ -51,6 +51,9 @@ AbstractAnalyzerAssemblyLoader.cs + + AnalyzerAssemblyLoadUtils.cs + ShadowCopyAnalyzerAssemblyLoader.cs diff --git a/src/Compilers/Helpers/AbstractAnalyzerAssemblyLoader.cs b/src/Compilers/Helpers/AbstractAnalyzerAssemblyLoader.cs index 9f51c1d7a0544..460cace3a1572 100644 --- a/src/Compilers/Helpers/AbstractAnalyzerAssemblyLoader.cs +++ b/src/Compilers/Helpers/AbstractAnalyzerAssemblyLoader.cs @@ -11,6 +11,8 @@ using System.Reflection.PortableExecutable; using Roslyn.Utilities; +using static Microsoft.CodeAnalysis.AnalyzerAssemblyLoadUtils; + namespace Microsoft.CodeAnalysis { internal abstract class AbstractAnalyzerAssemblyLoader : IAnalyzerAssemblyLoader @@ -148,41 +150,5 @@ private bool FileMatchesAssemblyName(string path, string assemblySimpleName) { return Path.GetFileNameWithoutExtension(path).Equals(assemblySimpleName, StringComparison.OrdinalIgnoreCase); } - - private static AssemblyIdentity TryGetAssemblyIdentity(string filePath) - { - try - { - if (!File.Exists(filePath)) - { - return null; - } - - using (var stream = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.Read | FileShare.Delete)) - using (var peReader = new PEReader(stream)) - { - var metadataReader = peReader.GetMetadataReader(); - - AssemblyDefinition assemblyDefinition = metadataReader.GetAssemblyDefinition(); - - string name = metadataReader.GetString(assemblyDefinition.Name); - Version version = assemblyDefinition.Version; - - StringHandle cultureHandle = assemblyDefinition.Culture; - string cultureName = (!cultureHandle.IsNil) ? metadataReader.GetString(cultureHandle) : null; - AssemblyFlags flags = assemblyDefinition.Flags; - - bool hasPublicKey = (flags & AssemblyFlags.PublicKey) != 0; - BlobHandle publicKeyHandle = assemblyDefinition.PublicKey; - ImmutableArray publicKeyOrToken = !publicKeyHandle.IsNil - ? metadataReader.GetBlobBytes(publicKeyHandle).AsImmutableOrNull() - : default(ImmutableArray); - return new AssemblyIdentity(name, version, cultureName, publicKeyOrToken, hasPublicKey); - } - } - catch { } - - return null; - } } } diff --git a/src/Compilers/Helpers/AnalyzerAssemblyLoadUtils.cs b/src/Compilers/Helpers/AnalyzerAssemblyLoadUtils.cs new file mode 100644 index 0000000000000..738bc62480e5f --- /dev/null +++ b/src/Compilers/Helpers/AnalyzerAssemblyLoadUtils.cs @@ -0,0 +1,45 @@ +// 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.Collections.Immutable; +using System.IO; +using System.Reflection; +using System.Reflection.Metadata; +using System.Reflection.PortableExecutable; + +namespace Microsoft.CodeAnalysis +{ + internal static class AnalyzerAssemblyLoadUtils + { + public static AssemblyIdentity TryGetAssemblyIdentity(string filePath) + { + try + { + using (var stream = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.Read | FileShare.Delete)) + using (var peReader = new PEReader(stream)) + { + var metadataReader = peReader.GetMetadataReader(); + + AssemblyDefinition assemblyDefinition = metadataReader.GetAssemblyDefinition(); + + string name = metadataReader.GetString(assemblyDefinition.Name); + Version version = assemblyDefinition.Version; + + StringHandle cultureHandle = assemblyDefinition.Culture; + string cultureName = (!cultureHandle.IsNil) ? metadataReader.GetString(cultureHandle) : null; + AssemblyFlags flags = assemblyDefinition.Flags; + + bool hasPublicKey = (flags & AssemblyFlags.PublicKey) != 0; + BlobHandle publicKeyHandle = assemblyDefinition.PublicKey; + ImmutableArray publicKeyOrToken = !publicKeyHandle.IsNil + ? metadataReader.GetBlobBytes(publicKeyHandle).AsImmutableOrNull() + : default(ImmutableArray); + return new AssemblyIdentity(name, version, cultureName, publicKeyOrToken, hasPublicKey); + } + } + catch { } + + return null; + } + } +} diff --git a/src/Compilers/Helpers/CoreClrAnalyzerAssemblyLoader.cs b/src/Compilers/Helpers/CoreClrAnalyzerAssemblyLoader.cs new file mode 100644 index 0000000000000..e5123fad85def --- /dev/null +++ b/src/Compilers/Helpers/CoreClrAnalyzerAssemblyLoader.cs @@ -0,0 +1,163 @@ +// 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.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Runtime.Loader; +using Roslyn.Utilities; + +using static Microsoft.CodeAnalysis.AnalyzerAssemblyLoadUtils; + +namespace Microsoft.CodeAnalysis +{ + /// Core CLR compatible wrapper for loading analyzers. + internal sealed class CoreClrAnalyzerAssemblyLoader : AssemblyLoadContext, IAnalyzerAssemblyLoader + { + private readonly Dictionary _pathsToAssemblies = new Dictionary(StringComparer.OrdinalIgnoreCase); + private readonly Dictionary _namesToAssemblies = new Dictionary(); + private readonly List _dependencyPaths = new List(); + private readonly object _guard = new object(); + + /// + /// Creates a new instance of , + /// sets that instance to be the default , + /// and returns that instance. Throws if the Default is already set or the + /// binding model is already locked. + /// + public static CoreClrAnalyzerAssemblyLoader CreateAndSetDefault() + { + var assemblyLoader = new CoreClrAnalyzerAssemblyLoader(); + InitializeDefaultContext(assemblyLoader); + return assemblyLoader; + } + + public void AddDependencyLocation(string fullPath) + { + if (fullPath == null) + { + throw new ArgumentNullException(nameof(fullPath)); + } + + lock (_guard) + { + _dependencyPaths.Add(fullPath); + } + } + + public Assembly LoadFromPath(string fullPath) + { + if (fullPath == null) + { + throw new ArgumentNullException(nameof(fullPath)); + } + + Debug.Assert(PathUtilities.IsAbsolute(fullPath)); + + lock (_guard) + { + Assembly assembly; + if (_pathsToAssemblies.TryGetValue(fullPath, out assembly)) + { + return assembly; + } + + return LoadAndCache(fullPath); + } + } + + private static readonly string[] s_extensions = new string[] { ".dll", ".exe" }; + + /// + /// Searches and loads from the base directory of the current + /// app context + /// + private Assembly AppContextLoad(AssemblyName assemblyName) + { + var baseDir = AppContext.BaseDirectory; + foreach (var extension in s_extensions) + { + var path = Path.Combine(baseDir, assemblyName.Name + extension); + + if (File.Exists(path)) + { + lock (_guard) + { + return LoadAndCache(path); + } + } + } + return null; + } + + protected override Assembly Load(AssemblyName assemblyName) + { + lock (_guard) + { + // Try and grab assembly using standard load + Assembly assembly = AppContextLoad(assemblyName); + if (assembly != null) + { + return assembly; + } + + string fullName = assemblyName.FullName; + + if (_namesToAssemblies.TryGetValue(fullName, out assembly)) + { + return assembly; + } + + AssemblyIdentity requestedIdentity; + if (!AssemblyIdentity.TryParseDisplayName(fullName, out requestedIdentity)) + { + return null; + } + + foreach (var candidatePath in _dependencyPaths) + { + if (IsAssemblyAlreadyLoaded(candidatePath) || + !FileMatchesAssemblyName(candidatePath, requestedIdentity.Name)) + { + continue; + } + + var candidateIdentity = TryGetAssemblyIdentity(candidatePath); + + if (requestedIdentity.Equals(candidateIdentity)) + { + return LoadAndCache(candidatePath); + } + } + + return null; + } + } + + /// + /// Assumes we have a lock on _guard + /// + private Assembly LoadAndCache(string fullPath) + { + var assembly = LoadFromAssemblyPath(fullPath); + var name = assembly.FullName; + + _pathsToAssemblies[fullPath] = assembly; + _namesToAssemblies[name] = assembly; + + return assembly; + } + + private bool IsAssemblyAlreadyLoaded(string path) + { + return _pathsToAssemblies.ContainsKey(path); + } + + private bool FileMatchesAssemblyName(string path, string assemblySimpleName) + { + return Path.GetFileNameWithoutExtension(path).Equals(assemblySimpleName, StringComparison.OrdinalIgnoreCase); + } + } +} diff --git a/src/Compilers/Helpers/NoOpAnalyzerAssemblyLoader.cs b/src/Compilers/Helpers/NoOpAnalyzerAssemblyLoader.cs deleted file mode 100644 index aeb7d124b70d2..0000000000000 --- a/src/Compilers/Helpers/NoOpAnalyzerAssemblyLoader.cs +++ /dev/null @@ -1,16 +0,0 @@ -// 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.Reflection; - -namespace Microsoft.CodeAnalysis -{ - /// - /// Workaround for assembly loading in core clr -- this loader does nothing. - /// - internal sealed class NoOpAnalyzerAssemblyLoader : IAnalyzerAssemblyLoader - { - public Assembly LoadFromPath(string fullPath) => null; - - public void AddDependencyLocation(string fullPath) { } - } -} diff --git a/src/Compilers/VisualBasic/VbcCore/Program.cs b/src/Compilers/VisualBasic/VbcCore/Program.cs index 3717f6b984a14..5a2e399ec2845 100644 --- a/src/Compilers/VisualBasic/VbcCore/Program.cs +++ b/src/Compilers/VisualBasic/VbcCore/Program.cs @@ -12,6 +12,6 @@ public static int Main(string[] args) => Vbc.Run(args: args, clientDirectory: AppContext.BaseDirectory, sdkDirectory: @"C:\Windows\Microsoft.NET\Framework\v4.0.30319", - analyzerLoader: new NoOpAnalyzerAssemblyLoader()); + analyzerLoader: CoreClrAnalyzerAssemblyLoader.CreateAndSetDefault()); } } diff --git a/src/Compilers/VisualBasic/VbcCore/VbcCore.csproj b/src/Compilers/VisualBasic/VbcCore/VbcCore.csproj index c4b816eb62210..875e40db99330 100644 --- a/src/Compilers/VisualBasic/VbcCore/VbcCore.csproj +++ b/src/Compilers/VisualBasic/VbcCore/VbcCore.csproj @@ -67,8 +67,11 @@ ConsoleUtil.cs - - ConsoleUtil.cs + + CoreClrAnalyzerAssemblyLoader.cs + + + AnalyzerAssemblyLoadUtils.cs diff --git a/src/Compilers/VisualBasic/VbcCore/project.json b/src/Compilers/VisualBasic/VbcCore/project.json index 25422da7c6dbd..29630aa6d7c6b 100644 --- a/src/Compilers/VisualBasic/VbcCore/project.json +++ b/src/Compilers/VisualBasic/VbcCore/project.json @@ -23,8 +23,9 @@ "System.Runtime.Extensions": "4.0.11-beta-23321", "System.Runtime.Handles": "4.0.1-beta-23321", "System.Runtime.InteropServices": "4.0.21-beta-23321", - "System.Security.Cryptography.Hashing.Algorithms": "4.0.0-beta-23311", + "System.Runtime.Loader": "4.0.0-beta-23321", "System.Runtime.Serialization.Json": "4.0.1-beta-23321", + "System.Security.Cryptography.Hashing.Algorithms": "4.0.0-beta-23311", "System.Text.Encoding": "4.0.11-beta-23321", "System.Text.Encoding.Extensions": "4.0.11-beta-23321", "System.Threading": "4.0.11-beta-23321", diff --git a/src/Compilers/VisualBasic/VbcCore/project.lock.json b/src/Compilers/VisualBasic/VbcCore/project.lock.json index feaae53a73437..bf187a281700b 100644 --- a/src/Compilers/VisualBasic/VbcCore/project.lock.json +++ b/src/Compilers/VisualBasic/VbcCore/project.lock.json @@ -478,6 +478,19 @@ "lib/DNXCore50/System.Runtime.InteropServices.dll": {} } }, + "System.Runtime.Loader/4.0.0-beta-23321": { + "dependencies": { + "System.IO": "[4.0.0, )", + "System.Reflection": "[4.0.0, )", + "System.Runtime": "[4.0.0, )" + }, + "compile": { + "ref/dotnet/System.Runtime.Loader.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Runtime.Loader.dll": {} + } + }, "System.Runtime.Serialization.Json/4.0.1-beta-23321": { "dependencies": { "System.Private.DataContractSerialization": "[4.0.1-beta-23321, )" @@ -1391,6 +1404,19 @@ "lib/DNXCore50/System.Runtime.InteropServices.dll": {} } }, + "System.Runtime.Loader/4.0.0-beta-23321": { + "dependencies": { + "System.IO": "[4.0.0, )", + "System.Reflection": "[4.0.0, )", + "System.Runtime": "[4.0.0, )" + }, + "compile": { + "ref/dotnet/System.Runtime.Loader.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Runtime.Loader.dll": {} + } + }, "System.Runtime.Serialization.Json/4.0.1-beta-23321": { "dependencies": { "System.Private.DataContractSerialization": "[4.0.1-beta-23321, )" @@ -2466,6 +2492,19 @@ "lib/DNXCore50/System.Runtime.InteropServices.dll": {} } }, + "System.Runtime.Loader/4.0.0-beta-23321": { + "dependencies": { + "System.IO": "[4.0.0, )", + "System.Reflection": "[4.0.0, )", + "System.Runtime": "[4.0.0, )" + }, + "compile": { + "ref/dotnet/System.Runtime.Loader.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Runtime.Loader.dll": {} + } + }, "System.Runtime.Serialization.Json/4.0.1-beta-23321": { "dependencies": { "System.Private.DataContractSerialization": "[4.0.1-beta-23321, )" @@ -4581,6 +4620,18 @@ "System.Runtime.InteropServices.nuspec" ] }, + "System.Runtime.Loader/4.0.0-beta-23321": { + "sha512": "xyfQB/CKuzy/kaiMWtNgX16mMTsgt2ktdmG7COIXBFAkHUARSeBAjMOWkGdNWPzOWINYumqamA8JxGsQlPhuPQ==", + "type": "Package", + "files": [ + "[Content_Types].xml", + "_rels/.rels", + "lib/DNXCore50/System.Runtime.Loader.dll", + "package/services/metadata/core-properties/55d60ad8f5d24e06bf703dd426e1ec45.psmdcp", + "ref/dotnet/System.Runtime.Loader.dll", + "System.Runtime.Loader.nuspec" + ] + }, "System.Runtime.Serialization.Json/4.0.1-beta-23321": { "sha512": "TWQRwFnriFMykVgsCyowKFI5eLWoceMtoIrrx9Wd2ZL+XAnsdiYe8OUVeL9Q0kLVs3Ew12sPiXtY2wvVDAYR3w==", "type": "Package", @@ -5138,6 +5189,7 @@ "System.Runtime.Extensions >= 4.0.11-beta-23321", "System.Runtime.Handles >= 4.0.1-beta-23321", "System.Runtime.InteropServices >= 4.0.21-beta-23321", + "System.Runtime.Loader >= 4.0.0-beta-23321", "System.Runtime.Serialization.Json >= 4.0.1-beta-23321", "System.Security.Cryptography.Hashing.Algorithms >= 4.0.0-beta-23311", "System.Text.Encoding >= 4.0.11-beta-23321", diff --git a/src/Compilers/VisualBasic/vbc/vbc.csproj b/src/Compilers/VisualBasic/vbc/vbc.csproj index 31be88342317a..b9c622423ac52 100644 --- a/src/Compilers/VisualBasic/vbc/vbc.csproj +++ b/src/Compilers/VisualBasic/vbc/vbc.csproj @@ -72,6 +72,9 @@ AbstractAnalyzerAssemblyLoader.cs + + AnalyzerAssemblyLoadUtils.cs + ConsoleUtil.cs diff --git a/src/Test/Utilities/Desktop/TestUtilities.Desktop.csproj b/src/Test/Utilities/Desktop/TestUtilities.Desktop.csproj index 0e3742f85cb83..75073b8ecd107 100644 --- a/src/Test/Utilities/Desktop/TestUtilities.Desktop.csproj +++ b/src/Test/Utilities/Desktop/TestUtilities.Desktop.csproj @@ -89,6 +89,9 @@ AbstractAnalyzerAssemblyLoader.cs + + AnalyzerAssemblyLoadUtils.cs + SimpleAnalyzerAssemblyLoader.cs @@ -163,4 +166,4 @@ - + \ No newline at end of file diff --git a/src/Workspaces/Core/Desktop/Workspaces.Desktop.csproj b/src/Workspaces/Core/Desktop/Workspaces.Desktop.csproj index 2cfcbb5f4f803..1cb331496ae48 100644 --- a/src/Workspaces/Core/Desktop/Workspaces.Desktop.csproj +++ b/src/Workspaces/Core/Desktop/Workspaces.Desktop.csproj @@ -58,6 +58,9 @@ InternalUtilities\AbstractAnalyzerAssemblyLoader.cs + + AnalyzerAssemblyLoadUtils.cs + InternalUtilities\FusionAssemblyIdentity.cs @@ -167,4 +170,4 @@ - \ No newline at end of file +