110 references to TargetFrameworkUtil
InteractiveHost.UnitTests (1)
AbstractInteractiveHostTests.cs (1)
203references: TargetFrameworkUtil.GetReferences(TargetFramework.NetStandard20, references),
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (2)
CommandLineTests.cs (2)
14238references: TargetFrameworkUtil.NetStandard20References.Add(MetadataReference.CreateFromAssemblyInternal(typeof(ISourceGenerator).Assembly)), 15412TargetFrameworkUtil.GetReferences(TargetFramework.Standard, new[] { MetadataReference.CreateFromAssemblyInternal(typeof(ISourceGenerator).Assembly) }),
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)
27416var comp = CreateVisualBasicCompilation(source, referencedAssemblies: TargetFrameworkUtil.GetReferences(TargetFramework.Standard));
Emit\CompilationEmitTests.cs (1)
4048references: TargetFrameworkUtil.GetReferences(TargetFramework.Standard),
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
PDB\PDBTests.cs (1)
140var comp = CSharpCompilation.Create("test", new[] { tree1, tree2 }, TargetFrameworkUtil.StandardReferences, TestOptions.DebugDll);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (28)
Attributes\AttributeTests.cs (1)
11065var 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)
276var comp1 = CreateVisualBasicCompilation(source1, referencedAssemblies: TargetFrameworkUtil.GetReferences(TargetFramework.Standard).Concat(ref0));
OverloadResolutionPriorityTests.cs (9)
664var comp1_1 = CreateCompilation(new AssemblyIdentity("Ret", new Version(1, 0, 0, 0), isRetargetable: true), source1, TargetFrameworkUtil.StandardReferences); 665var comp1_2 = CreateCompilation(new AssemblyIdentity("Ret", new Version(2, 0, 0, 0), isRetargetable: true), source1, TargetFrameworkUtil.StandardReferences); 712var comp1_1 = CreateCompilation(new AssemblyIdentity("Ret", new Version(1, 0, 0, 0), isRetargetable: true), source1, TargetFrameworkUtil.StandardReferences); 713var comp1_2 = CreateCompilation(new AssemblyIdentity("Ret", new Version(2, 0, 0, 0), isRetargetable: true), source1, TargetFrameworkUtil.StandardReferences); 773var comp1_1 = CreateCompilation(new AssemblyIdentity("Base", new Version(1, 0, 0, 0), isRetargetable: true), source1, TargetFrameworkUtil.StandardReferences); 774var comp1_2 = CreateCompilation(new AssemblyIdentity("Base", new Version(2, 0, 0, 0), isRetargetable: true), source1, TargetFrameworkUtil.StandardReferences); 1879var vb = CreateVisualBasicCompilation(GetUniqueName(), vbSource, referencedAssemblies: TargetFrameworkUtil.NetStandard20References, referencedCompilations: [attrRef], 2952var vb = CreateVisualBasicCompilation(GetUniqueName(), vbSource, referencedAssemblies: TargetFrameworkUtil.GetReferences(TargetFramework.Standard), 3006var vb = CreateVisualBasicCompilation(GetUniqueName(), vbSource, referencedAssemblies: TargetFrameworkUtil.GetReferences(TargetFramework.Standard),
Semantics\CollectionExpressionTests.cs (2)
38850var comp = CreateCompilation(new AssemblyIdentity(assemblyName, new Version(1, 0, 0, 0)), sourceA1, references: TargetFrameworkUtil.StandardReferences); 38873comp = CreateCompilation(new AssemblyIdentity(assemblyName, new Version(2, 0, 0, 0)), sourceA2, references: TargetFrameworkUtil.StandardReferences);
Semantics\ExperimentalAttributeTests.cs (8)
926var originalC = CreateCompilation(new AssemblyIdentity("Ret", new Version(1, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences); 927var retargetedC = CreateCompilation(new AssemblyIdentity("Ret", new Version(2, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences); 963var originalC = CreateCompilation(new AssemblyIdentity("Ret", new Version(1, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences); 964var retargetedC = CreateCompilation(new AssemblyIdentity("Ret", new Version(2, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences); 991var originalC = CreateCompilation(new AssemblyIdentity("Ret", new Version(1, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences); 992var retargetedC = CreateCompilation(new AssemblyIdentity("Ret", new Version(2, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences); 1028var originalC = CreateCompilation(new AssemblyIdentity("Ret", new Version(1, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences); 1029var retargetedC = CreateCompilation(new AssemblyIdentity("Ret", new Version(2, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
Semantics\ExtensionTests2.cs (1)
32641var allReferences = TargetFrameworkUtil.GetReferences(targetFramework: TargetFramework.Standard).Add(ilReference);
Semantics\InlineArrayTests.cs (2)
120var vbComp = CreateVisualBasicCompilation("", referencedAssemblies: TargetFrameworkUtil.GetReferences(TargetFramework.Net80, null)); 18204var vbComp = CreateVisualBasicCompilation("", referencedAssemblies: TargetFrameworkUtil.GetReferences(TargetFramework.Net70, null));
Semantics\ParamsCollectionTests.cs (2)
6888var comp2 = CreateVisualBasicCompilation(src2, referencedAssemblies: TargetFrameworkUtil.GetReferences(TargetFramework.Standard).Concat(comp1Ref)); 7790var comp2 = CreateVisualBasicCompilation(src2, referencedAssemblies: TargetFrameworkUtil.GetReferences(TargetFramework.Standard).Concat(comp1Ref));
Semantics\RecordTests.cs (1)
30268var compA = CreateEmptyCompilation(new[] { sourceA, IsExternalInitTypeDefinition }, references: TargetFrameworkUtil.GetReferences(TargetFramework.NetStandard20));
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (6)
InteractiveSessionReferencesTests.cs (6)
34var libImage = CreateCSharpCompilation(libSource, TargetFrameworkUtil.NetStandard20References, "lib").EmitToArray(); 84var libDImage = CreateCSharpCompilation(libDSource, TargetFrameworkUtil.NetStandard20References, "libD").EmitToArray(); 88var libAImage = CreateCSharpCompilation(libASource, TargetFrameworkUtil.NetStandard20References.Concat(libDRef), "libA").EmitToArray(); 91var libBImage = CreateCSharpCompilation(libBSource, TargetFrameworkUtil.NetStandard20References.Concat(libDRef), "libB").EmitToArray(); 127var libBImage = CreateCSharpCompilation(libBSource, TargetFrameworkUtil.NetStandard20References, "libB").EmitToArray(); 133var libAImage = CreateCSharpCompilation(libASource, TargetFrameworkUtil.NetStandard20References.Concat(libBRef), "libA").EmitToArray();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (6)
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)
1053var references = TargetFrameworkUtil.GetReferences(TargetFramework.Standard).ToArray();
Semantics\RefFieldTests.cs (2)
9141var references = TargetFrameworkUtil.GetReferences(TargetFramework.Standard, additionalReferences: null); 21400var references = TargetFrameworkUtil.GetReferences(TargetFramework.NetCoreApp, additionalReferences: null);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (32)
Compilation\CompilationAPITests.cs (1)
2367var 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), 5227var comp1 = CreateVisualBasicCompilation(source1, referencedAssemblies: TargetFrameworkUtil.GetReferences(TargetFramework.Standard, new[] { comp0ImageRef }));
SymbolDisplay\SymbolDisplayTests.cs (1)
3144TargetFrameworkUtil.GetReferences(TargetFramework.Standard).Concat(hostReference),
Symbols\DefaultInterfaceImplementationTests.cs (2)
50684IEnumerable<MetadataReference> baseReferences = TargetFrameworkUtil.GetReferencesWithout(TargetFramework.Net50, "System.Runtime.InteropServices.dll"); 50754baseReferences = TargetFrameworkUtil.GetReferencesWithout(TargetFramework.NetLatest, "System.Runtime.InteropServices.dll").Concat(new[] { attributesRef });
Symbols\ExtendedPartialMethodsTests.cs (1)
2932var vbComp = CreateVisualBasicCompilation(vb, referencedAssemblies: TargetFrameworkUtil.GetReferences(TargetFramework.Standard).Add(comp.EmitToImageReference()));
Symbols\GenericConstraintTests.cs (2)
7369TargetFrameworkUtil.NetStandard20References.ToArray(), 7375TargetFrameworkUtil.NetStandard20References.ToArray(),
Symbols\RequiredMembersTests.cs (10)
2193var originalC = CreateCompilation(new AssemblyIdentity("Ret", new Version(1, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences); 2205var retargetedC = CreateCompilation(new AssemblyIdentity("Ret", new Version(2, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences); 2242var originalC = CreateCompilation(new AssemblyIdentity("Ret", new Version(1, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences); 2270var retargetedC = CreateCompilation(new AssemblyIdentity("Ret", new Version(2, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences); 2288var originalC = CreateCompilation(new AssemblyIdentity("Ret", new Version(1, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences); 2300var retargetedC = CreateCompilation(new AssemblyIdentity("Ret", new Version(2, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences); 2548var originalC = CreateCompilation(new AssemblyIdentity("Ret", new Version(1, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences); 2558var retargetedC = CreateCompilation(new AssemblyIdentity("Ret", new Version(2, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences); 2579var originalC = CreateCompilation(new AssemblyIdentity("Ret", new Version(1, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences); 2589var 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 (4)
CSharpTestBase.cs (4)
1643var allReferences = TargetFrameworkUtil.GetReferences(targetFramework, references).Add(ilReference); 1689bool skipUsesIsNullable = false) => CreateCompilationCore(source, TargetFrameworkUtil.GetReferences(TargetFramework.Mscorlib461, references), options, parseOptions, assemblyName, sourceFileName, skipUsesIsNullable, experimentalFeature: feature); 1760allReferences = [.. TargetFrameworkUtil.Mscorlib461ExtendedReferences, Net461.ExtraReferences.SystemThreadingTasksExtensions]; 1781return CreateEmptyCompilation(source, TargetFrameworkUtil.GetReferences(targetFramework, references), options, parseOptions, assemblyName, sourceFileName, skipUsesIsNullable);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
EditAndContinue\EditAndContinueLanguageServiceTests.cs (1)
374AddMetadataReferences(projectId, TargetFrameworkUtil.GetReferences(TargetFramework.Mscorlib40)).
Microsoft.CodeAnalysis.Features.Test.Utilities (3)
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (2)
99.WithMetadataReferences(TargetFrameworkUtil.GetReferences(DefaultTargetFramework)); 376var references = TargetFrameworkUtil.GetReferences(targetFramework);
EditAndContinue\Extensions.cs (1)
77.WithProjectMetadataReferences(id, TargetFrameworkUtil.GetReferences(targetFramework))
Microsoft.CodeAnalysis.Features.UnitTests (10)
EditAndContinue\CompileTimeSolutionProviderTests.cs (1)
46WithProjectMetadataReferences(projectId, TargetFrameworkUtil.GetReferences(TargetFramework.NetStandard20)).
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (5)
648references: TargetFrameworkUtil.GetReferences(TargetFramework.NetStandard20), 1363AddMetadataReferences(TargetFrameworkUtil.GetReferences(TargetFramework.Mscorlib40)); 1523AddMetadataReferences(projectId, TargetFrameworkUtil.GetReferences(TargetFramework.Mscorlib40)). 3112AddMetadataReferences(TargetFrameworkUtil.GetReferences(TargetFramework.Mscorlib40)); 3173AddMetadataReferences(TargetFrameworkUtil.GetReferences(TargetFramework.Mscorlib40)).
EditAndContinue\EditSessionActiveStatementsTests.cs (1)
74.WithMetadataReferences(TargetFrameworkUtil.GetReferences(TargetFramework.Standard));
EditAndContinue\EmitSolutionUpdateResultsTests.cs (1)
75WithMetadataReferences(TargetFrameworkUtil.GetReferences(TargetFramework.Standard)).
EditAndContinue\RemoteEditAndContinueServiceTests.cs (1)
83.AddMetadataReferences(projectId, TargetFrameworkUtil.GetReferences(TargetFramework.Mscorlib40))
EditAndContinue\UnitTestingHotReloadServiceTests.cs (1)
33WithMetadataReferences(TargetFrameworkUtil.GetReferences(DefaultTargetFramework));
Microsoft.CodeAnalysis.Test.Utilities (2)
Compilation\CompilationExtensions.cs (1)
515references: 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)
23code, referencedAssemblies: TargetFrameworkUtil.GetReferences(TargetFramework.NetStandard20));
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (5)
Workspaces\TestWorkspace_XmlConsumption.cs (5)
910references = [.. TargetFrameworkUtil.NetStandard20References]; 918references = [.. TargetFrameworkUtil.GetReferences(TargetFramework.Net60)]; 926references = [.. TargetFrameworkUtil.GetReferences(TargetFramework.Net70)]; 934references = [.. TargetFrameworkUtil.GetReferences(TargetFramework.Net80)]; 942references = [.. TargetFrameworkUtil.GetReferences(TargetFramework.Net90)];