132 references to TargetFrameworkUtil
InteractiveHost.UnitTests (1)
AbstractInteractiveHostTests.cs (1)
200references: TargetFrameworkUtil.GetReferences(TargetFramework.NetStandard20, references),
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (2)
CommandLineTests.cs (2)
13549references: TargetFrameworkUtil.NetStandard20References.Add(MetadataReference.CreateFromAssemblyInternal(typeof(ISourceGenerator).Assembly)), 14505TargetFrameworkUtil.GetReferences(TargetFramework.Standard, new[] { MetadataReference.CreateFromAssemblyInternal(typeof(ISourceGenerator).Assembly) }),
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
ConvertToRecord\ConvertToRecordCodeRefactoringTests.cs (1)
4556.WithProjectMetadataReferences(projectId, TargetFrameworkUtil.GetReferences(TargetFramework.Net60));
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (6)
CodeGen\CodeGenFunctionPointersTests.cs (4)
54? TargetFrameworkUtil.GetReferences(TargetFramework.Net50) 55: TargetFrameworkUtil.GetReferencesWithout(TargetFramework.Net50, "System.Runtime.InteropServices.dll"); 68? TargetFrameworkUtil.GetReferences(TargetFramework.Net50) 69: TargetFrameworkUtil.GetReferencesWithout(TargetFramework.Net50, "System.Runtime.InteropServices.dll");
CodeGen\CodeGenTupleTest.cs (1)
27454var comp = CreateVisualBasicCompilation(source, referencedAssemblies: TargetFrameworkUtil.GetReferences(TargetFramework.Standard));
PDB\PDBTests.cs (1)
133var comp = CSharpCompilation.Create("test", new[] { tree1, tree2 }, TargetFrameworkUtil.StandardReferences, TestOptions.DebugDll);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (3)
Attributes\AttributeTests.cs (1)
10765var comp2 = CreateVisualBasicCompilation(vbSource, referencedAssemblies: TargetFrameworkUtil.GetReferences(TargetFramework.Standard).Concat(comp.EmitToImageReference()));
Attributes\AttributeTests_CallerInfoAttributes.cs (1)
23TargetFrameworkUtil.GetReferencesWithout(TargetFramework.Net50, "System.Runtime.InteropServices.dll");
Attributes\AttributeTests_NullableContext.cs (1)
275var comp1 = CreateVisualBasicCompilation(source1, referencedAssemblies: TargetFrameworkUtil.GetReferences(TargetFramework.Standard).Concat(ref0));
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler.UnitTests (1)
LocalsTests.cs (1)
3849var references = TargetFrameworkUtil.Mscorlib461ExtendedReferences.Concat(new[] { Net461.SystemThreadingTasks, TestMetadata.SystemThreadingTasksExtensions.PortableLib });
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (6)
InteractiveSessionReferencesTests.cs (6)
35var libImage = CreateCSharpCompilation(libSource, TargetFrameworkUtil.NetStandard20References, "lib").EmitToArray(); 85var libDImage = CreateCSharpCompilation(libDSource, TargetFrameworkUtil.NetStandard20References, "libD").EmitToArray(); 89var libAImage = CreateCSharpCompilation(libASource, TargetFrameworkUtil.NetStandard20References.Concat(libDRef), "libA").EmitToArray(); 92var libBImage = CreateCSharpCompilation(libBSource, TargetFrameworkUtil.NetStandard20References.Concat(libDRef), "libB").EmitToArray(); 128var libBImage = CreateCSharpCompilation(libBSource, TargetFrameworkUtil.NetStandard20References, "libB").EmitToArray(); 134var libAImage = CreateCSharpCompilation(libASource, TargetFrameworkUtil.NetStandard20References.Concat(libBRef), "libA").EmitToArray();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (7)
Semantics\AccessCheckTests.cs (1)
963c = CreateEmptyCompilation(source, TargetFrameworkUtil.GetReferences(TargetFramework.Standard).AddRange(new[] { r1, r2 }));
Semantics\InheritanceBindingTests.cs (2)
2996new[] { source1 }, TargetFrameworkUtil.GetReferences(TargetFramework.Standard, null).ToArray(), TestOptions.DebugDll.WithPublicSign(true)); 2999new[] { source1 }, TargetFrameworkUtil.GetReferences(TargetFramework.Standard, null).ToArray(), TestOptions.DebugDll.WithPublicSign(true));
Semantics\NativeIntegerTests.cs (1)
1048var references = TargetFrameworkUtil.GetReferences(TargetFramework.Standard).ToArray();
Semantics\RecordTests.cs (1)
30142var compA = CreateEmptyCompilation(new[] { sourceA, IsExternalInitTypeDefinition }, references: TargetFrameworkUtil.GetReferences(TargetFramework.NetStandard20));
Semantics\RefFieldTests.cs (2)
8639var references = TargetFrameworkUtil.GetReferences(TargetFramework.Standard, additionalReferences: null); 20790var references = TargetFrameworkUtil.GetReferences(TargetFramework.NetCoreApp, additionalReferences: null);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (32)
Compilation\CompilationAPITests.cs (1)
2369var vbComp = CreateVisualBasicCompilation("", referencedAssemblies: TargetFrameworkUtil.GetReferences(TargetFramework.Standard));
Compilation\ReferenceManagerTests.cs (9)
831references = TargetFrameworkUtil.StandardReferences.AddRange(references); 962var c = CreateEmptyCompilation("class C {}", TargetFrameworkUtil.StandardReferences.AddRange(new[] { ref1, ref2 })); 984var c = CreateEmptyCompilation("class C {}", TargetFrameworkUtil.StandardReferences.AddRange(new[] { ref1, ref2 })); 1056CreateEmptyCompilation(source, TargetFrameworkUtil.StandardReferences.AddRange(new[] { ref1, ref2 })).VerifyDiagnostics(); 1133TargetFrameworkUtil.StandardReferences.AddRange(new[] { mdRefLib1, mdRefLib2 })); 1198TargetFrameworkUtil.StandardReferences.AddRange(new[] { mdRefLib1, mdRefLib2 })); 1225var compilation = CreateEmptyCompilation(source, TargetFrameworkUtil.StandardReferences.AddRange(new[] { arSA, enUS })); 2184TargetFrameworkUtil.StandardReferences.AddRange(new[] { refVectors40, refVectors41 }), 2194TargetFrameworkUtil.StandardReferences.AddRange(new[] { refVectors41, refVectors40 }),
Compilation\UsedAssembliesTests.cs (2)
298references: TargetFrameworkUtil.GetReferences(targetFramework).Concat(references), 5132var comp1 = CreateVisualBasicCompilation(source1, referencedAssemblies: TargetFrameworkUtil.GetReferences(TargetFramework.Standard, new[] { comp0ImageRef }));
SymbolDisplay\SymbolDisplayTests.cs (1)
2721TargetFrameworkUtil.GetReferences(TargetFramework.Standard).Concat(hostReference),
Symbols\DefaultInterfaceImplementationTests.cs (2)
50497IEnumerable<MetadataReference> baseReferences = TargetFrameworkUtil.GetReferencesWithout(TargetFramework.Net50, "System.Runtime.InteropServices.dll"); 50567baseReferences = TargetFrameworkUtil.GetReferencesWithout(TargetFramework.NetLatest, "System.Runtime.InteropServices.dll").Concat(new[] { attributesRef });
Symbols\ExtendedPartialMethodsTests.cs (1)
2524var vbComp = CreateVisualBasicCompilation(vb, referencedAssemblies: TargetFrameworkUtil.GetReferences(TargetFramework.Standard).Add(comp.EmitToImageReference()));
Symbols\GenericConstraintTests.cs (2)
7331TargetFrameworkUtil.NetStandard20References.ToArray(), 7337TargetFrameworkUtil.NetStandard20References.ToArray(),
Symbols\RequiredMembersTests.cs (10)
2176var originalC = CreateCompilation(new AssemblyIdentity("Ret", new Version(1, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences); 2188var retargetedC = CreateCompilation(new AssemblyIdentity("Ret", new Version(2, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences); 2225var originalC = CreateCompilation(new AssemblyIdentity("Ret", new Version(1, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences); 2253var retargetedC = CreateCompilation(new AssemblyIdentity("Ret", new Version(2, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences); 2271var originalC = CreateCompilation(new AssemblyIdentity("Ret", new Version(1, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences); 2283var retargetedC = CreateCompilation(new AssemblyIdentity("Ret", new Version(2, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences); 2449var originalC = CreateCompilation(new AssemblyIdentity("Ret", new Version(1, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences); 2459var retargetedC = CreateCompilation(new AssemblyIdentity("Ret", new Version(2, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences); 2480var originalC = CreateCompilation(new AssemblyIdentity("Ret", new Version(1, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences); 2490var retargetedC = CreateCompilation(new AssemblyIdentity("Ret", new Version(2, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
Symbols\Retargeting\RetargetingTests.cs (1)
934var standardReference = TargetFrameworkUtil.StandardReferences.ToArray();
Symbols\Source\EventTests.cs (3)
446CompileAndVerify(source: source, references: new[] { TargetFrameworkUtil.StandardCSharpReference, libAssemblyRef }, 492var compilationVerifier = CompileAndVerify(source: source, references: new[] { TargetFrameworkUtil.StandardCSharpReference, libAssemblyRef }, 810var compVerifier = CompileAndVerify(source, new[] { TargetFrameworkUtil.StandardCSharpReference, CompileIL(ilSource) },
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Syntax\SyntaxTreeTests.cs (1)
96var compilation = CSharpCompilation.Create("test", new[] { tree }, TargetFrameworkUtil.GetReferences(TargetFramework.Standard), TestOptions.DebugDll);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (5)
CSharpTestBase.cs (5)
1052var allReferences = TargetFrameworkUtil.GetReferences(targetFramework, references).Add(ilReference); 1098bool skipUsesIsNullable = false) => CreateCompilationCore(source, TargetFrameworkUtil.GetReferences(TargetFramework.Mscorlib45, references), options, parseOptions, assemblyName, sourceFileName, skipUsesIsNullable, experimentalFeature: feature); 1165allReferences = TargetFrameworkUtil.NetStandard20References; 1170allReferences = TargetFrameworkUtil.Mscorlib461ExtendedReferences; 1192return CreateEmptyCompilation(source, TargetFrameworkUtil.GetReferences(targetFramework, references), options, parseOptions, assemblyName, sourceFileName, skipUsesIsNullable);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (4)
EditAndContinue\EditAndContinueTestHelpers.cs (1)
396oldProject = workspace.AddProject(projectInfo).WithMetadataReferences(TargetFrameworkUtil.GetReferences(targetFramework));
Workspaces\TestWorkspace_XmlConsumption.cs (3)
1112references = TargetFrameworkUtil.NetStandard20References.ToList(); 1120references = TargetFrameworkUtil.GetReferences(TargetFramework.Net60).ToList(); 1128references = TargetFrameworkUtil.GetReferences(TargetFramework.Net70).ToList();
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (22)
EditAndContinue\CompileTimeSolutionProviderTests.cs (1)
49WithProjectMetadataReferences(projectId, TargetFrameworkUtil.GetReferences(TargetFramework.NetStandard20)).
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (18)
126WithMetadataReferences(TargetFrameworkUtil.GetReferences(DefaultTargetFramework)); 812AddMetadataReferences(projectId, TargetFrameworkUtil.GetReferences(TargetFramework.Mscorlib40)). 981AddMetadataReferences(TargetFrameworkUtil.GetReferences(TargetFramework.Mscorlib40)). 1034AddMetadataReferences(TargetFrameworkUtil.GetReferences(DefaultTargetFramework)). 1093AddMetadataReferences(TargetFrameworkUtil.GetReferences(TargetFramework.Mscorlib40)). 1179AddMetadataReferences(TargetFrameworkUtil.GetReferences(TargetFramework.Mscorlib40)); 1345AddMetadataReferences(projectId, TargetFrameworkUtil.GetReferences(TargetFramework.Mscorlib40)). 1568AddMetadataReferences(TargetFrameworkUtil.GetReferences(TargetFramework.Mscorlib40)); 1676AddMetadataReferences(TargetFrameworkUtil.GetReferences(TargetFramework.Mscorlib40)). 1720AddMetadataReferences(TargetFrameworkUtil.GetReferences(TargetFramework.Mscorlib40)). 2430AddMetadataReferences(TargetFrameworkUtil.GetReferences(DefaultTargetFramework)). 2518AddMetadataReferences(TargetFrameworkUtil.GetReferences(TargetFramework.Mscorlib40)). 2586AddMetadataReferences(TargetFrameworkUtil.GetReferences(TargetFramework.Mscorlib40)); 2648AddMetadataReferences(TargetFrameworkUtil.GetReferences(TargetFramework.Mscorlib40)). 4472WithMetadataReferences(TargetFrameworkUtil.GetReferences(DefaultTargetFramework)); 4559WithMetadataReferences(TargetFrameworkUtil.GetReferences(DefaultTargetFramework)); 4626WithMetadataReferences(TargetFrameworkUtil.GetReferences(DefaultTargetFramework)); 4695AddMetadataReferences(projectId, TargetFrameworkUtil.GetReferences(TargetFramework.Mscorlib40)).
EditAndContinue\EditSessionActiveStatementsTests.cs (1)
74.WithMetadataReferences(TargetFrameworkUtil.GetReferences(TargetFramework.Standard));
EditAndContinue\EmitSolutionUpdateResultsTests.cs (1)
33WithMetadataReferences(TargetFrameworkUtil.GetReferences(TargetFramework.Standard)).
EditAndContinue\RemoteEditAndContinueServiceTests.cs (1)
85.AddMetadataReferences(projectId, TargetFrameworkUtil.GetReferences(TargetFramework.Mscorlib40))
Microsoft.CodeAnalysis.Test.Utilities (2)
Compilation\CompilationExtensions.cs (1)
506references: TargetFrameworkUtil.GetReferences(targetFramework),
PDB\DeterministicBuildCompilationTestHelpers.cs (1)
78var frameworkReferences = TargetFrameworkUtil.GetReferences(targetFramework);
Microsoft.CodeAnalysis.UnitTests (2)
Analyzers\AnalyzerFileReferenceTests.cs (1)
486TargetFrameworkUtil.GetReferences(TargetFramework.Standard, new[] { MetadataReference.CreateFromAssemblyInternal(typeof(ISourceGenerator).Assembly) }),
Symbols\DocumentationCommentIdTests.cs (1)
21code, referencedAssemblies: TargetFrameworkUtil.GetReferences(TargetFramework.NetStandard20));
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (1)
CommandLineTests.vb (1)
10563TargetFrameworkUtil.GetReferences(Roslyn.Test.Utilities.TargetFramework.Standard, {MetadataReference.CreateFromAssemblyInternal(GetType(ISourceGenerator).Assembly)}),
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (6)
Attributes\AttributeTests_CallerArgumentExpression.vb (1)
194Dim csCompilation = CreateCSharpCompilation("Program2.Log(5 + 2);", referencedAssemblies:=TargetFrameworkUtil.GetReferences(TargetFramework.Net50, {compilation.EmitToImageReference()}), compilationOptions:=New CSharp.CSharpCompilationOptions(OutputKind.ConsoleApplication))
CodeGen\CodeGenTuples.vb (4)
17351referencedAssemblies:=TargetFrameworkUtil.GetReferences(TargetFramework.StandardAndVBRuntime)) 21329referencedAssemblies:=TargetFrameworkUtil.GetReferences(TargetFramework.StandardAndVBRuntime)) 21465referencedAssemblies:=TargetFrameworkUtil.GetReferences(TargetFramework.StandardAndVBRuntime)) 23121Dim comp = CreateCSharpCompilation(source, referencedAssemblies:=TargetFrameworkUtil.GetReferences(TargetFramework.Standard))
PDB\PDBTests.vb (1)
86Dim comp = VisualBasicCompilation.Create("test", {tree1, tree2}, TargetFrameworkUtil.StandardReferences, TestOptions.DebugDll)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (11)
Compilation\CompilationAPITests.vb (2)
2450Dim references = TargetFrameworkUtil.Mscorlib40References.AddRange({reference, reference}) 2505Dim csComp = CreateCSharpCompilation("", referencedAssemblies:=TargetFrameworkUtil.GetReferences(TargetFramework.Standard))
Compilation\ReferenceManagerTests.vb (6)
683TargetFrameworkUtil.Mscorlib40References.AddRange({r1, r2}), 698TargetFrameworkUtil.Mscorlib40References.AddRange({r1, r2}), 706TargetFrameworkUtil.Mscorlib40References.AddRange({r1, rEmbed}), 720TargetFrameworkUtil.Mscorlib40References.AddRange({rEmbed, r1}), 1984Dim references = TargetFrameworkUtil.Mscorlib40References.AddRange({dRef, eRef, b1Ref, b2Ref}) 2034TargetFrameworkUtil.Mscorlib40References.AddRange({dRef, eRef, b1Ref, b2Ref}),
Semantics\NativeIntegerTests.vb (1)
68Dim comp = VisualBasicCompilation.Create(assemblyName:=GetUniqueName(), references:=TargetFrameworkUtil.GetReferences(TargetFramework.DefaultVb), options:=TestOptions.ReleaseDll)
Semantics\RefFieldTests.vb (2)
27Dim compA = CreateCSharpCompilation(GetUniqueName(), sourceA, referencedAssemblies:=TargetFrameworkUtil.GetReferences(TargetFramework.Net70)) 147Dim compB = CreateCSharpCompilation(GetUniqueName(), sourceB, referencedAssemblies:=TargetFrameworkUtil.GetReferences(TargetFramework.Net70, {refA}))
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (15)
DocumentationComments\DocCommentTests.vb (2)
12459Dim references = TargetFrameworkUtil.GetReferences(TargetFramework.StandardAndVBRuntime) 12489Dim references = TargetFrameworkUtil.GetReferences(TargetFramework.StandardAndVBRuntime)
SymbolsTests\AttributeTests_UnmanagedCallersOnly.vb (1)
16Private ReadOnly _csharpReferences As ImmutableArray(Of MetadataReference) = TargetFrameworkUtil.GetReferences(TargetFramework.Net50)
SymbolsTests\CheckedUserDefinedOperatorsTests.vb (3)
184Dim comp3 = CreateCSharpCompilation("", referencedAssemblies:=TargetFrameworkUtil.GetReferences(TargetFramework.Standard, {ilReference})) 371Dim comp3 = CreateCSharpCompilation("", referencedAssemblies:=TargetFrameworkUtil.GetReferences(TargetFramework.Standard, {ilReference})) 550Dim comp3 = CreateCSharpCompilation("", referencedAssemblies:=TargetFrameworkUtil.GetReferences(TargetFramework.Standard, {ilReference}))
SymbolsTests\CompilationCreationTests.vb (3)
2244compilation = VisualBasicCompilation.Create("Compilation", references:=TargetFrameworkUtil.GetReferences(TargetFramework.Net50, Nothing)) 2252compilation = VisualBasicCompilation.Create("Compilation", references:=TargetFrameworkUtil.GetReferences(TargetFramework.Net60, Nothing)) 2260compilation = VisualBasicCompilation.Create("Compilation", references:=TargetFrameworkUtil.GetReferences(TargetFramework.Net70, Nothing))
SymbolsTests\DefaultInterfaceImplementationTests.vb (1)
29referencedAssemblies:=TargetFrameworkUtil.GetReferences(targetFramework, additionalReferences),
SymbolsTests\RelaxedShiftOperatorTests.vb (1)
30referencedAssemblies:=TargetFrameworkUtil.GetReferences(TargetFramework.Standard)).EmitToImageReference()
SymbolsTests\StaticAbstractMembersInInterfacesTests.vb (1)
25referencedAssemblies:=TargetFrameworkUtil.GetReferences(targetFramework, additionalReferences),
SymbolsTests\UnsignedRightShiftTests.vb (2)
31referencedAssemblies:=TargetFrameworkUtil.GetReferences(TargetFramework.Standard)).EmitToImageReference() 70referencedAssemblies:=TargetFrameworkUtil.GetReferences(TargetFramework.Standard)).EmitToImageReference()
UsedAssembliesTests.vb (1)
143references:=TargetFrameworkUtil.GetReferences(targetFramework).Concat(references),
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (4)
BasicTestBase.vb (3)
808Dim allReferences = TargetFrameworkUtil.Mscorlib45ExtendedReferences.Add( 885Dim allReferences As IEnumerable(Of MetadataReference) = TargetFrameworkUtil.Mscorlib45ExtendedReferences.Add( 905Dim references As IEnumerable(Of MetadataReference) = TargetFrameworkUtil.Mscorlib45ExtendedReferences.Add(
CompilationTestUtils.vb (1)
32references = TargetFrameworkUtil.GetReferences(targetFramework, references)