diff --git a/eng/Versions.props b/eng/Versions.props index 1b0533541cfe2..334d6010b0fec 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -50,9 +50,10 @@ --> 0.9.3 - 1.2.1 - 1.2.1 - 1.2.2 + 1.2.4 + 1.2.4 + 1.2.4 + 1.2.4 0.13.0 0.13.0 1.4.4 @@ -78,7 +79,7 @@ $(MicrosoftCodeAnalysisTestingVersion) $(CodeStyleAnalyzerVersion) 1.0.0-rc14 - 2.0.41 + 2.0.44 $(MicrosoftCodeAnalysisTestingVersion) $(MicrosoftCodeAnalysisTestingVersion) $(MicrosoftCodeAnalysisTestingVersion) diff --git a/src/Compilers/CSharp/Test/CommandLine/CommandLineTests.cs b/src/Compilers/CSharp/Test/CommandLine/CommandLineTests.cs index ded4e33b6a2fc..98b76278577ff 100644 --- a/src/Compilers/CSharp/Test/CommandLine/CommandLineTests.cs +++ b/src/Compilers/CSharp/Test/CommandLine/CommandLineTests.cs @@ -35,6 +35,7 @@ using Roslyn.Test.Utilities.TestGenerators; using Roslyn.Utilities; using Xunit; +using Basic.Reference.Assemblies; using static Microsoft.CodeAnalysis.CommonDiagnosticAnalyzers; using static Roslyn.Test.Utilities.SharedResourceHelpers; using static Roslyn.Test.Utilities.TestMetadata; @@ -11513,7 +11514,7 @@ public void LoadinganalyzerNetStandard13() var analyzerDir = Temp.CreateDirectory(); - var analyzerFile = analyzerDir.CreateFile(analyzerFileName).WriteAllBytes(DesktopTestHelpers.CreateCSharpAnalyzerNetStandard13(Path.GetFileNameWithoutExtension(analyzerFileName))); + var analyzerFile = analyzerDir.CreateFile(analyzerFileName).WriteAllBytes(CreateCSharpAnalyzerNetStandard13(Path.GetFileNameWithoutExtension(analyzerFileName))); var srcFile = analyzerDir.CreateFile(srcFileName).WriteAllText("public class C { }"); var result = ProcessUtilities.Run(s_CSharpCompilerExecutable, arguments: $"/nologo /t:library /analyzer:{analyzerFileName} {srcFileName}", workingDirectory: analyzerDir.Path); @@ -11530,6 +11531,165 @@ at Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.ExecuteAndCatchIfThrows_N } #endif + private static ImmutableArray CreateCSharpAnalyzerNetStandard13(string analyzerAssemblyName) + { + var minSystemCollectionsImmutableSource = @" +[assembly: System.Reflection.AssemblyVersion(""1.2.3.0"")] + +namespace System.Collections.Immutable +{ + public struct ImmutableArray + { + } +} +"; + + var minCodeAnalysisSource = @" +using System; + +[assembly: System.Reflection.AssemblyVersion(""2.0.0.0"")] + +namespace Microsoft.CodeAnalysis.Diagnostics +{ + [AttributeUsage(AttributeTargets.Class)] + public sealed class DiagnosticAnalyzerAttribute : Attribute + { + public DiagnosticAnalyzerAttribute(string firstLanguage, params string[] additionalLanguages) {} + } + + public abstract class DiagnosticAnalyzer + { + public abstract System.Collections.Immutable.ImmutableArray SupportedDiagnostics { get; } + public abstract void Initialize(AnalysisContext context); + } + + public abstract class AnalysisContext + { + } +} + +namespace Microsoft.CodeAnalysis +{ + public sealed class DiagnosticDescriptor + { + } +} +"; + var minSystemCollectionsImmutableImage = CSharpCompilation.Create( + "System.Collections.Immutable", + new[] { SyntaxFactory.ParseSyntaxTree(minSystemCollectionsImmutableSource) }, + new MetadataReference[] { NetStandard13.SystemRuntime }, + new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary, cryptoPublicKey: TestResources.TestKeys.PublicKey_b03f5f7f11d50a3a)).EmitToArray(); + + var minSystemCollectionsImmutableRef = MetadataReference.CreateFromImage(minSystemCollectionsImmutableImage); + + var minCodeAnalysisImage = CSharpCompilation.Create( + "Microsoft.CodeAnalysis", + new[] { SyntaxFactory.ParseSyntaxTree(minCodeAnalysisSource) }, + new MetadataReference[] + { + NetStandard13.SystemRuntime, + minSystemCollectionsImmutableRef + }, + new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary, cryptoPublicKey: TestResources.TestKeys.PublicKey_31bf3856ad364e35)).EmitToArray(); + + var minCodeAnalysisRef = MetadataReference.CreateFromImage(minCodeAnalysisImage); + + var analyzerSource = @" +using System; +using System.Collections.ObjectModel; +using System.Collections.Immutable; +using System.ComponentModel; +using System.Diagnostics; +using System.Globalization; +using System.IO; +using System.IO.Compression; +using System.Net.Http; +using System.Net.Security; +using System.Net.Sockets; +using System.Reflection; +using System.Runtime.InteropServices; +using System.Runtime.Serialization; +using System.Security.AccessControl; +using System.Security.Cryptography; +using System.Security.Principal; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Xml; +using System.Xml.Serialization; +using System.Xml.XPath; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.Diagnostics; +using Microsoft.Win32.SafeHandles; + +[DiagnosticAnalyzer(""C#"")] +public class TestAnalyzer : DiagnosticAnalyzer +{ + public override ImmutableArray SupportedDiagnostics => throw new NotImplementedException(new[] + { + typeof(Win32Exception), // Microsoft.Win32.Primitives + typeof(AppContext), // System.AppContext + typeof(Console), // System.Console + typeof(ValueTuple), // System.ValueTuple + typeof(FileVersionInfo), // System.Diagnostics.FileVersionInfo + typeof(Process), // System.Diagnostics.Process + typeof(ChineseLunisolarCalendar), // System.Globalization.Calendars + typeof(ZipArchive), // System.IO.Compression + typeof(ZipFile), // System.IO.Compression.ZipFile + typeof(FileOptions), // System.IO.FileSystem + typeof(FileAttributes), // System.IO.FileSystem.Primitives + typeof(HttpClient), // System.Net.Http + typeof(AuthenticatedStream), // System.Net.Security + typeof(IOControlCode), // System.Net.Sockets + typeof(RuntimeInformation), // System.Runtime.InteropServices.RuntimeInformation + typeof(SerializationException), // System.Runtime.Serialization.Primitives + typeof(GenericIdentity), // System.Security.Claims + typeof(Aes), // System.Security.Cryptography.Algorithms + typeof(CspParameters), // System.Security.Cryptography.Csp + typeof(AsnEncodedData), // System.Security.Cryptography.Encoding + typeof(AsymmetricAlgorithm), // System.Security.Cryptography.Primitives + typeof(SafeX509ChainHandle), // System.Security.Cryptography.X509Certificates + typeof(IXmlLineInfo), // System.Xml.ReaderWriter + typeof(XmlNode), // System.Xml.XmlDocument + typeof(XPathDocument), // System.Xml.XPath + typeof(XDocumentExtensions), // System.Xml.XPath.XDocument + typeof(CodePagesEncodingProvider),// System.Text.Encoding.CodePages + typeof(ValueTask<>), // System.Threading.Tasks.Extensions + + // csc doesn't ship with facades for the following assemblies. + // Analyzers can't use them unless they carry the facade with them. + + // typeof(SafePipeHandle), // System.IO.Pipes + // typeof(StackFrame), // System.Diagnostics.StackTrace + // typeof(BindingFlags), // System.Reflection.TypeExtensions + // typeof(AccessControlActions), // System.Security.AccessControl + // typeof(SafeAccessTokenHandle), // System.Security.Principal.Windows + // typeof(Thread), // System.Threading.Thread + }.Length.ToString()); + + public override void Initialize(AnalysisContext context) + { + } +}"; + + var references = + new MetadataReference[] + { + minCodeAnalysisRef, + minSystemCollectionsImmutableRef + }; + references = references.Concat(NetStandard13.All).ToArray(); + + var analyzerImage = CSharpCompilation.Create( + analyzerAssemblyName, + new SyntaxTree[] { SyntaxFactory.ParseSyntaxTree(analyzerSource) }, + references: references, + new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary)).EmitToArray(); + + return analyzerImage; + } + [WorkItem(406649, "https://devdiv.visualstudio.com/DevDiv/_workitems?id=484417")] [ConditionalFact(typeof(WindowsDesktopOnly), typeof(IsEnglishLocal), Reason = "https://github.com/dotnet/roslyn/issues/30321")] public void MicrosoftDiaSymReaderNativeAltLoadPath() diff --git a/src/Compilers/CSharp/Test/CommandLine/Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests.csproj b/src/Compilers/CSharp/Test/CommandLine/Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests.csproj index c61c2cb6c28ea..a8b99bd04d4f7 100644 --- a/src/Compilers/CSharp/Test/CommandLine/Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests.csproj +++ b/src/Compilers/CSharp/Test/CommandLine/Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests.csproj @@ -20,6 +20,7 @@ + diff --git a/src/Compilers/Test/Core/Mocks/TestReferences.cs b/src/Compilers/Test/Core/Mocks/TestReferences.cs index fad57339caa64..eafc5462b7c40 100644 --- a/src/Compilers/Test/Core/Mocks/TestReferences.cs +++ b/src/Compilers/Test/Core/Mocks/TestReferences.cs @@ -104,14 +104,6 @@ public static class silverlight_v5_0_5_0 } } - public static class NetStandard13 - { - private static readonly Lazy s_systemRuntime = new Lazy( - () => AssemblyMetadata.CreateFromImage(ProprietaryTestResources.netstandard13.System_Runtime).GetReference(display: @"System.Runtime.dll (netstandard13 ref)"), - LazyThreadSafetyMode.PublicationOnly); - public static PortableExecutableReference SystemRuntime => s_systemRuntime.Value; - } - public static class DiagnosticTests { public static class ErrTestLib01 diff --git a/src/Compilers/Test/Core/Platform/Desktop/TestHelpers.cs b/src/Compilers/Test/Core/Platform/Desktop/TestHelpers.cs index f6e1d31bef118..ca24d0e79ea41 100644 --- a/src/Compilers/Test/Core/Platform/Desktop/TestHelpers.cs +++ b/src/Compilers/Test/Core/Platform/Desktop/TestHelpers.cs @@ -93,196 +93,6 @@ public class TestAnalyzer : DiagnosticAnalyzer return dir.CreateFile(assemblyName + ".dll").WriteAllBytes(analyzerCompilation.EmitToArray()); } - public static ImmutableArray CreateCSharpAnalyzerNetStandard13(string analyzerAssemblyName) - { - var minSystemCollectionsImmutableSource = @" -[assembly: System.Reflection.AssemblyVersion(""1.2.3.0"")] - -namespace System.Collections.Immutable -{ - public struct ImmutableArray - { - } -} -"; - - var minCodeAnalysisSource = @" -using System; - -[assembly: System.Reflection.AssemblyVersion(""2.0.0.0"")] - -namespace Microsoft.CodeAnalysis.Diagnostics -{ - [AttributeUsage(AttributeTargets.Class)] - public sealed class DiagnosticAnalyzerAttribute : Attribute - { - public DiagnosticAnalyzerAttribute(string firstLanguage, params string[] additionalLanguages) {} - } - - public abstract class DiagnosticAnalyzer - { - public abstract System.Collections.Immutable.ImmutableArray SupportedDiagnostics { get; } - public abstract void Initialize(AnalysisContext context); - } - - public abstract class AnalysisContext - { - } -} - -namespace Microsoft.CodeAnalysis -{ - public sealed class DiagnosticDescriptor - { - } -} -"; - var minSystemCollectionsImmutableImage = CSharpCompilation.Create( - "System.Collections.Immutable", - new[] { SyntaxFactory.ParseSyntaxTree(minSystemCollectionsImmutableSource) }, - new[] { MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_Runtime) }, - new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary, cryptoPublicKey: TestResources.TestKeys.PublicKey_b03f5f7f11d50a3a)).EmitToArray(); - - var minSystemCollectionsImmutableRef = MetadataReference.CreateFromImage(minSystemCollectionsImmutableImage); - - var minCodeAnalysisImage = CSharpCompilation.Create( - "Microsoft.CodeAnalysis", - new[] { SyntaxFactory.ParseSyntaxTree(minCodeAnalysisSource) }, - new[] - { - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_Runtime), - minSystemCollectionsImmutableRef - }, - new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary, cryptoPublicKey: TestResources.TestKeys.PublicKey_31bf3856ad364e35)).EmitToArray(); - - var minCodeAnalysisRef = MetadataReference.CreateFromImage(minCodeAnalysisImage); - - var analyzerSource = @" -using System; -using System.Collections.ObjectModel; -using System.Collections.Immutable; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.IO; -using System.IO.Compression; -using System.Net.Http; -using System.Net.Security; -using System.Net.Sockets; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Runtime.Serialization; -using System.Security.AccessControl; -using System.Security.Cryptography; -using System.Security.Principal; -using System.Text; -using System.Threading; -using System.Threading.Tasks; -using System.Xml; -using System.Xml.Serialization; -using System.Xml.XPath; -using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.Diagnostics; -using Microsoft.Win32.SafeHandles; - -[DiagnosticAnalyzer(""C#"")] -public class TestAnalyzer : DiagnosticAnalyzer -{ - public override ImmutableArray SupportedDiagnostics => throw new NotImplementedException(new[] - { - typeof(Win32Exception), // Microsoft.Win32.Primitives - typeof(AppContext), // System.AppContext - typeof(Console), // System.Console - typeof(ValueTuple), // System.ValueTuple - typeof(FileVersionInfo), // System.Diagnostics.FileVersionInfo - typeof(Process), // System.Diagnostics.Process - typeof(ChineseLunisolarCalendar), // System.Globalization.Calendars - typeof(ZipArchive), // System.IO.Compression - typeof(ZipFile), // System.IO.Compression.ZipFile - typeof(FileOptions), // System.IO.FileSystem - typeof(FileAttributes), // System.IO.FileSystem.Primitives - typeof(HttpClient), // System.Net.Http - typeof(AuthenticatedStream), // System.Net.Security - typeof(IOControlCode), // System.Net.Sockets - typeof(RuntimeInformation), // System.Runtime.InteropServices.RuntimeInformation - typeof(SerializationException), // System.Runtime.Serialization.Primitives - typeof(GenericIdentity), // System.Security.Claims - typeof(Aes), // System.Security.Cryptography.Algorithms - typeof(CspParameters), // System.Security.Cryptography.Csp - typeof(AsnEncodedData), // System.Security.Cryptography.Encoding - typeof(AsymmetricAlgorithm), // System.Security.Cryptography.Primitives - typeof(SafeX509ChainHandle), // System.Security.Cryptography.X509Certificates - typeof(IXmlLineInfo), // System.Xml.ReaderWriter - typeof(XmlNode), // System.Xml.XmlDocument - typeof(XPathDocument), // System.Xml.XPath - typeof(XDocumentExtensions), // System.Xml.XPath.XDocument - typeof(CodePagesEncodingProvider),// System.Text.Encoding.CodePages - typeof(ValueTask<>), // System.Threading.Tasks.Extensions - - // csc doesn't ship with facades for the following assemblies. - // Analyzers can't use them unless they carry the facade with them. - - // typeof(SafePipeHandle), // System.IO.Pipes - // typeof(StackFrame), // System.Diagnostics.StackTrace - // typeof(BindingFlags), // System.Reflection.TypeExtensions - // typeof(AccessControlActions), // System.Security.AccessControl - // typeof(SafeAccessTokenHandle), // System.Security.Principal.Windows - // typeof(Thread), // System.Threading.Thread - }.Length.ToString()); - - public override void Initialize(AnalysisContext context) - { - } -}"; - - var analyzerImage = CSharpCompilation.Create( - analyzerAssemblyName, - new SyntaxTree[] { SyntaxFactory.ParseSyntaxTree(analyzerSource) }, - new MetadataReference[] - { - minCodeAnalysisRef, - minSystemCollectionsImmutableRef, - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.Microsoft_Win32_Primitives), - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_AppContext), - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_Console), - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_ValueTuple), - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_Diagnostics_FileVersionInfo), - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_Diagnostics_Process), - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_Diagnostics_StackTrace), - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_Globalization_Calendars), - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_IO_Compression), - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_IO_Compression_ZipFile), - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_IO_FileSystem), - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_IO_FileSystem_Primitives), - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_IO_Pipes), - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_Net_Http), - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_Net_Security), - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_Net_Sockets), - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_Reflection_TypeExtensions), - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_Runtime), - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_Runtime_InteropServices_RuntimeInformation), - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_Runtime_Serialization_Primitives), - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_Security_AccessControl), - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_Security_Claims), - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_Security_Cryptography_Algorithms), - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_Security_Cryptography_Csp), - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_Security_Cryptography_Encoding), - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_Security_Cryptography_Primitives), - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_Security_Cryptography_X509Certificates), - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_Security_Principal_Windows), - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_Threading_Thread), - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_Threading_Tasks_Extensions), - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_Xml_ReaderWriter), - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_Xml_XmlDocument), - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_Xml_XPath), - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_Xml_XPath_XDocument), - MetadataReference.CreateFromImage(ProprietaryTestResources.netstandard13.System_Text_Encoding_CodePages) - }, - new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary)).EmitToArray(); - - return analyzerImage; - } - public static string? GetMSBuildDirectory() { var vsVersion = Environment.GetEnvironmentVariable("VisualStudioVersion") ?? "14.0"; diff --git a/src/Compilers/Test/Core/TestBase.cs b/src/Compilers/Test/Core/TestBase.cs index 3bfc95565d5e7..b00ee4b1cc24f 100644 --- a/src/Compilers/Test/Core/TestBase.cs +++ b/src/Compilers/Test/Core/TestBase.cs @@ -250,11 +250,6 @@ private static MetadataReference GetOrCreateMetadataReference(ref MetadataRefere public static MetadataReference Net46StandardFacade => s_46NetStandardFacade.Value; - private static readonly Lazy s_systemDynamicRuntimeRef = new Lazy( - () => AssemblyMetadata.CreateFromImage(ProprietaryTestResources.netstandard13.System_Dynamic_Runtime).GetReference(display: "System.Dynamic.Runtime.dll (netstandard 1.3 ref)"), - LazyThreadSafetyMode.PublicationOnly); - public static MetadataReference SystemDynamicRuntimeRef => s_systemDynamicRuntimeRef.Value; - private static readonly Lazy s_systemRef = new Lazy( () => AssemblyMetadata.CreateFromImage(ResourcesNet451.System).GetReference(display: "System.v4_0_30319.dll"), LazyThreadSafetyMode.PublicationOnly); diff --git a/src/Scripting/CSharpTest/InteractiveSessionTests.cs b/src/Scripting/CSharpTest/InteractiveSessionTests.cs index bb65994e787fe..e8e71ed9857ed 100644 --- a/src/Scripting/CSharpTest/InteractiveSessionTests.cs +++ b/src/Scripting/CSharpTest/InteractiveSessionTests.cs @@ -21,6 +21,7 @@ using Microsoft.CodeAnalysis.Test.Utilities; using Roslyn.Test.Utilities; using Xunit; +using Basic.Reference.Assemblies; namespace Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests { @@ -1197,7 +1198,7 @@ public interface I public class C : I { public int F() => 1; -}", new MetadataReference[] { TestReferences.NetStandard13.SystemRuntime, lib1.ToMetadataReference() }); +}", new MetadataReference[] { NetStandard13.SystemRuntime, lib1.ToMetadataReference() }); lib2.Emit(file2.Path); @@ -1259,7 +1260,7 @@ public void ExtensionPriority1() var main = CreateCSharpCompilation( @"public static class M { public static readonly C X = new C(); }", - new MetadataReference[] { TestReferences.NetStandard13.SystemRuntime, libExe.ToMetadataReference() }, + new MetadataReference[] { NetStandard13.SystemRuntime, libExe.ToMetadataReference() }, mainName); var exeImage = libExe.EmitToArray(); @@ -1289,7 +1290,7 @@ public void ExtensionPriority2() var main = CreateCSharpCompilation( @"public static class M { public static readonly C X = new C(); }", - new MetadataReference[] { TestReferences.NetStandard13.SystemRuntime, libExe.ToMetadataReference() }, + new MetadataReference[] { NetStandard13.SystemRuntime, libExe.ToMetadataReference() }, mainName); var exeImage = libExe.EmitToArray(); diff --git a/src/Scripting/CoreTestUtilities/Microsoft.CodeAnalysis.Scripting.TestUtilities.csproj b/src/Scripting/CoreTestUtilities/Microsoft.CodeAnalysis.Scripting.TestUtilities.csproj index 318e666190c3c..61fac444517a3 100644 --- a/src/Scripting/CoreTestUtilities/Microsoft.CodeAnalysis.Scripting.TestUtilities.csproj +++ b/src/Scripting/CoreTestUtilities/Microsoft.CodeAnalysis.Scripting.TestUtilities.csproj @@ -17,6 +17,7 @@ + diff --git a/src/Scripting/CoreTestUtilities/TestCompilationFactory.cs b/src/Scripting/CoreTestUtilities/TestCompilationFactory.cs index a7f4a7654a6ee..0e7bb7c2c582b 100644 --- a/src/Scripting/CoreTestUtilities/TestCompilationFactory.cs +++ b/src/Scripting/CoreTestUtilities/TestCompilationFactory.cs @@ -8,6 +8,7 @@ using System.Collections.Generic; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.VisualBasic; +using Basic.Reference.Assemblies; namespace Microsoft.CodeAnalysis.Scripting { @@ -20,7 +21,7 @@ internal static Compilation CreateCSharpCompilationWithCorlib(string source, str return CSharpCompilation.Create( assemblyName ?? Guid.NewGuid().ToString(), new[] { CSharp.SyntaxFactory.ParseSyntaxTree(source) }, - new[] { TestReferences.NetStandard13.SystemRuntime }, + new[] { NetStandard13.SystemRuntime }, new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary)); } @@ -29,7 +30,7 @@ internal static Compilation CreateVisualBasicCompilationWithCorlib(string source return VisualBasicCompilation.Create( assemblyName ?? Guid.NewGuid().ToString(), new[] { VisualBasic.SyntaxFactory.ParseSyntaxTree(source) }, - new[] { TestReferences.NetStandard13.SystemRuntime }, + new[] { NetStandard13.SystemRuntime }, new VisualBasicCompilationOptions(OutputKind.DynamicallyLinkedLibrary)); }