163 references to CreateFromFile
ConfigurationSchemaGenerator (1)
ConfigSchemaGenerator.cs (1)
50return MetadataReference.CreateFromFile(path, documentation: documentationProvider);
ConfigurationSchemaGenerator.Tests (22)
GeneratorTests.cs (22)
46MetadataReference.CreateFromFile(typeof(Attribute).Assembly.Location), 47MetadataReference.CreateFromFile(typeof(Attribute).Assembly.Location.Replace("System.Private.CoreLib", "System.Runtime")), 48MetadataReference.CreateFromFile(typeof(Enumerable).Assembly.Location), 49MetadataReference.CreateFromFile(typeof(HttpContent).Assembly.Location) 454MetadataReference.CreateFromFile(typeof(Uri).Assembly.Location), 455MetadataReference.CreateFromFile(typeof(X509Certificate2).Assembly.Location) 685MetadataReference.CreateFromFile(typeof(TypeConverter).Assembly.Location), 686MetadataReference.CreateFromFile(typeof(TypeConverterAttribute).Assembly.Location), 687MetadataReference.CreateFromFile(typeof(Host).Assembly.Location), 688MetadataReference.CreateFromFile(typeof(IHost).Assembly.Location), 689MetadataReference.CreateFromFile(typeof(IServiceCollection).Assembly.Location), 690MetadataReference.CreateFromFile(typeof(IServiceProvider).Assembly.Location), 691MetadataReference.CreateFromFile(typeof(IConfigurationBuilder).Assembly.Location), 692MetadataReference.CreateFromFile(typeof(ConfigurationManager).Assembly.Location), 693MetadataReference.CreateFromFile(typeof(IOptionsMonitor<>).Assembly.Location), 694MetadataReference.CreateFromFile(typeof(OptionsBuilderConfigurationExtensions).Assembly.Location), 695MetadataReference.CreateFromFile(typeof(BinderOptions).Assembly.Location), 696MetadataReference.CreateFromFile(typeof(Console).Assembly.Location) 755MetadataReference.CreateFromFile(typeof(DynamicAttribute).Assembly.Location), 756MetadataReference.CreateFromFile(typeof(JsonNamingPolicy).Assembly.Location) 784MetadataReference.CreateFromFile(typeof(ConfigurationKeyNameAttribute).Assembly.Location) 824MetadataReference.CreateFromFile(typeof(ConfigurationKeyNameAttribute).Assembly.Location)
IdeCoreBenchmarks (1)
SwitchStatementBenchmarks.cs (1)
71solution = solution.AddMetadataReference(projectId, MetadataReference.CreateFromFile(typeof(object).Assembly.Location));
InteractiveHost.UnitTests (1)
InteractiveHostDesktopTests.cs (1)
485MetadataReference.CreateFromFile(lib1.Path));
Microsoft.Analyzers.Extra.Tests (8)
Resources\RoslynTestUtils.cs (4)
41refs.Add(MetadataReference.CreateFromFile(corelib)); 42refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "netstandard.dll"))); 43refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "System.Runtime.dll"))); 50refs.Add(MetadataReference.CreateFromFile(r.Location));
SyntaxNodeExtensionsTests.cs (4)
52references: new[] { MetadataReference.CreateFromFile(typeof(object).Assembly.Location) }); 84references: new[] { MetadataReference.CreateFromFile(typeof(object).Assembly.Location) }); 147references: new[] { MetadataReference.CreateFromFile(typeof(object).Assembly.Location) }); 177references: new[] { MetadataReference.CreateFromFile(typeof(object).Assembly.Location) });
Microsoft.Analyzers.Local.Tests (4)
Resources\RoslynTestUtils.cs (4)
41refs.Add(MetadataReference.CreateFromFile(corelib)); 42refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "netstandard.dll"))); 43refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "System.Runtime.dll"))); 50refs.Add(MetadataReference.CreateFromFile(r.Location));
Microsoft.AspNetCore.Analyzer.Testing (2)
DiagnosticProject.cs (1)
49solution = solution.AddMetadataReference(projectId, MetadataReference.CreateFromFile(resolveReferencePath));
DiagnosticVerifier.cs (1)
169Solution = Solution.AddMetadataReference(projectId, MetadataReference.CreateFromFile(resolveReferencePath));
Microsoft.AspNetCore.Analyzers.Test (1)
src\Shared\AnalyzerTesting\TestReferences.cs (1)
56references.Add(MetadataReference.CreateFromFile(assemblyPath));
Microsoft.AspNetCore.App.Analyzers.Test (1)
TestDiagnosticAnalyzer.cs (1)
159project = project.AddMetadataReference(MetadataReference.CreateFromFile(assembly));
Microsoft.AspNetCore.Components.Analyzers.Tests (4)
Helpers\DiagnosticVerifier.Helper.cs (4)
20private static readonly MetadataReference CorlibReference = MetadataReference.CreateFromFile(typeof(object).Assembly.Location); 21private static readonly MetadataReference SystemCoreReference = MetadataReference.CreateFromFile(typeof(Enumerable).Assembly.Location); 22private static readonly MetadataReference CSharpSymbolsReference = MetadataReference.CreateFromFile(typeof(CSharpCompilation).Assembly.Location); 23private static readonly MetadataReference CodeAnalysisReference = MetadataReference.CreateFromFile(typeof(Compilation).Assembly.Location);
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (4)
Helpers\DiagnosticVerifier.Helper.cs (4)
20private static readonly MetadataReference CorlibReference = MetadataReference.CreateFromFile(typeof(object).Assembly.Location); 21private static readonly MetadataReference SystemCoreReference = MetadataReference.CreateFromFile(typeof(Enumerable).Assembly.Location); 22private static readonly MetadataReference CSharpSymbolsReference = MetadataReference.CreateFromFile(typeof(CSharpCompilation).Assembly.Location); 23private static readonly MetadataReference CodeAnalysisReference = MetadataReference.CreateFromFile(typeof(Compilation).Assembly.Location);
Microsoft.AspNetCore.Http.Extensions.Tests (1)
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
340project = project.AddMetadataReference(MetadataReference.CreateFromFile(resolveReferencePath));
Microsoft.AspNetCore.Http.Microbenchmarks (1)
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
340project = project.AddMetadataReference(MetadataReference.CreateFromFile(resolveReferencePath));
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (11)
PdbSourceDocument\AbstractPdbSourceDocumentTests.cs (1)
228project = project.AddMetadataReference(MetadataReference.CreateFromFile(GetDllPath(path)));
PdbSourceDocument\ImplementationAssemblyLookupServiceTests.cs (8)
184implProject = implProject.AddMetadataReference(MetadataReference.CreateFromFile(dllFilePath)); 244implProject = implProject.AddMetadataReference(MetadataReference.CreateFromFile(dllFilePath)); 305implProject = implProject.AddMetadataReference(MetadataReference.CreateFromFile(dllFilePath)); 360implProject = implProject.AddMetadataReference(MetadataReference.CreateFromFile(dllFilePath)); 411implProject = implProject.AddMetadataReference(MetadataReference.CreateFromFile(dllFilePath)); 476implProject = implProject.AddMetadataReference(MetadataReference.CreateFromFile(dllFilePath)); 534implProject = workspace.CurrentSolution.Projects.First().AddMetadataReference(MetadataReference.CreateFromFile(dllFilePath)); 548implProject = workspace.CurrentSolution.Projects.First().AddMetadataReference(MetadataReference.CreateFromFile(realImplementationDllFilePath));
PdbSourceDocument\PdbSourceDocumentTests.cs (2)
547implProject = implProject.AddMetadataReference(MetadataReference.CreateFromFile(implementationDllFilePath)); 943project = project.AddMetadataReference(MetadataReference.CreateFromFile(GetDllPath(path)));
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (2)
InteractiveSessionReferencesTests.cs (2)
88var libDRef = MetadataReference.CreateFromFile(libDFile.Path); 133var libBRef = MetadataReference.CreateFromFile(libBFile.Path);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (17)
Compilation\ReferenceManagerTests.cs (11)
856var r1 = MetadataReference.CreateFromFile(p1); 857var r2 = MetadataReference.CreateFromFile(p2); 858var r3 = MetadataReference.CreateFromFile(p3); 927var m1 = MetadataReference.CreateFromFile(p1, new MetadataReferenceProperties(MetadataImageKind.Module)); 928var m2 = MetadataReference.CreateFromFile(p2, new MetadataReferenceProperties(MetadataImageKind.Module)); 996var r1 = MetadataReference.CreateFromFile(p1); 997var r2 = MetadataReference.CreateFromFile(p2); 1020new[] { MetadataReference.CreateFromFile(p1), MetadataReference.CreateFromFile(p2) }, 1252return ImmutableArray.Create(MetadataReference.CreateFromFile(path1)); 1256return ImmutableArray.Create(MetadataReference.CreateFromFile(path2));
SymbolDisplay\SymbolDisplayTests.cs (1)
3024var hostReference = MetadataReference.CreateFromFile(typeof(ScriptGlobals).Assembly.Location);
Symbols\CompilationCreationTests.cs (5)
2652return ImmutableArray.Create(MetadataReference.CreateFromFile(_data)); 2655return ImmutableArray.Create(MetadataReference.CreateFromFile(_core)); 2658return ImmutableArray.Create(MetadataReference.CreateFromFile(_system)); 2663return ImmutableArray.Create(MetadataReference.CreateFromFile(reference)); 2764return ImmutableArray.Create(MetadataReference.CreateFromFile(path, properties));
Microsoft.CodeAnalysis.Features (1)
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (1)
148var dllReference = IOUtilities.PerformIO(() => MetadataReference.CreateFromFile(dllPath, documentation: documentationProvider.GetDocumentationProvider(dllPath)));
Microsoft.CodeAnalysis.LanguageServer (1)
HostWorkspace\MetadataService.cs (1)
32MetadataReference.CreateFromFile(path, properties, documentationProviderService.GetDocumentationProvider(path)));
Microsoft.CodeAnalysis.Scripting.TestUtilities (3)
TestRuntimeMetadataReferenceResolver.cs (3)
34return MetadataReference.CreateFromFile(testDependencyAssemblyPath, s_resolvedMissingAssemblyReferenceProperties); 41return MetadataReference.CreateFromFile(fxAssemblyPath, s_resolvedMissingAssemblyReferenceProperties); 53return ImmutableArray.Create(MetadataReference.CreateFromFile(reference, properties));
Microsoft.CodeAnalysis.Test.Utilities (12)
AssemblyLoadTestFixture.cs (12)
194var delta1Reference = MetadataReference.CreateFromFile(Delta1); 225var delta2Reference = MetadataReference.CreateFromFile(Delta2); 245GammaReferencingPublicSigned = GenerateDll("GammaReferencingPublicSigned", _directory.CreateDirectory("GammaReferencingPublicSigned"), GammaSource, MetadataReference.CreateFromFile(DeltaPublicSigned1)); 247var gammaReference = MetadataReference.CreateFromFile(Gamma); 301EpsilonReferencingPublicSigned = GenerateDll("EpsilonReferencingPublicSigned", v2PublicSignedDirectory, EpsilonSource, MetadataReference.CreateFromFile(DeltaPublicSigned2)); 342var compilerReference = MetadataReference.CreateFromFile(typeof(Microsoft.CodeAnalysis.SyntaxNode).Assembly.Location); 361var userSystemCollectionsImmutableReference = MetadataReference.CreateFromFile(UserSystemCollectionsImmutable); 403", MetadataReference.CreateFromFile(delta1InAnalyzerReferencesDelta1.Path), compilerReference); 416var realSciReference = MetadataReference.CreateFromFile(typeof(ImmutableArray).Assembly.Location); 440}", realSciReference, compilerReference, MetadataReference.CreateFromFile(AnalyzerDependency)); 478var fakeCompilerReference = MetadataReference.CreateFromFile(fakeCompilerAssembly); 506var laterCompilerReference = MetadataReference.CreateFromFile(laterFakeCompilerAssembly);
Microsoft.CodeAnalysis.UnitTests (7)
AnalyzerAssemblyLoaderTests.cs (3)
1202var compilerReference = MetadataReference.CreateFromFile(typeof(SyntaxNode).Assembly.Location); 1203var immutableReference = MetadataReference.CreateFromFile(typeof(ImmutableArray).Assembly.Location); 1320MetadataReference.CreateFromFile(deltaFilePath)
MetadataReferences\MetadataReferenceTests.cs (4)
163var r = MetadataReference.CreateFromFile(file.Path, 173Assert.Equal(props, MetadataReference.CreateFromFile(file.Path, props).Properties); 187var r = MetadataReference.CreateFromFile(file.Path, MetadataReferenceProperties.Module); 196Assert.Equal(props, MetadataReference.CreateFromFile(file.Path, props).Properties);
Microsoft.CodeAnalysis.Workspaces.UnitTests (13)
SymbolKeyTests.cs (2)
1475MetadataReference.CreateFromFile(typeof(object).Assembly.Location), 1476MetadataReference.CreateFromFile(typeof(Enumerable).Assembly.Location)
UtilityTest\XmlDocumentationProviderTests.cs (1)
36var portableExecutableReference = MetadataReference.CreateFromFile(roslynCompilersLocation, documentation: documentationProvider);
WorkspaceTests\WorkspaceReferenceTests.cs (10)
27metadataReferences: ImmutableArray.Create<MetadataReference>(PortableExecutableReference.CreateFromFile(typeof(object).Assembly.Location))); 56metadataReferences: ImmutableArray.Create<MetadataReference>(PortableExecutableReference.CreateFromFile(typeof(object).Assembly.Location))); 67metadataReferences: ImmutableArray.Create<MetadataReference>(PortableExecutableReference.CreateFromFile(typeof(object).Assembly.Location))); 96metadataReferences: ImmutableArray.Create<MetadataReference>(PortableExecutableReference.CreateFromFile(typeof(object).Assembly.Location))); 107metadataReferences: ImmutableArray.Create<MetadataReference>(PortableExecutableReference.CreateFromFile(typeof(object).Assembly.Location))); 136metadataReferences: ImmutableArray.Create<MetadataReference>(PortableExecutableReference.CreateFromFile(typeof(object).Assembly.Location))); 147metadataReferences: ImmutableArray.Create<MetadataReference>(PortableExecutableReference.CreateFromFile(typeof(object).Assembly.Location))); 180metadataReferences: ImmutableArray.Create<MetadataReference>(PortableExecutableReference.CreateFromFile(typeof(object).Assembly.Location))); 190PortableExecutableReference.CreateFromFile(typeof(object).Assembly.Location), 191PortableExecutableReference.CreateFromFile(typeof(Workspace).Assembly.Location)));
Microsoft.Gen.ComplianceReports.Unit.Tests (4)
test\Generators\Shared\RoslynTestUtils.cs (4)
64refs.Add(MetadataReference.CreateFromFile(corelib)); 65refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "netstandard.dll"))); 66refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "System.Runtime.dll"))); 73refs.Add(MetadataReference.CreateFromFile(r.Location));
Microsoft.Gen.ContextualOptions.Unit.Tests (4)
test\Generators\Shared\RoslynTestUtils.cs (4)
64refs.Add(MetadataReference.CreateFromFile(corelib)); 65refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "netstandard.dll"))); 66refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "System.Runtime.dll"))); 73refs.Add(MetadataReference.CreateFromFile(r.Location));
Microsoft.Gen.Logging.Unit.Tests (13)
CompilationHelper.cs (9)
29refs.Add(MetadataReference.CreateFromFile(corelib)); 30refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "netstandard.dll"))); 31refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "System.Runtime.dll"))); 32refs.Add(MetadataReference.CreateFromFile(typeof(ILogger).Assembly.Location)); 33refs.Add(MetadataReference.CreateFromFile(typeof(LoggerMessageAttribute).Assembly.Location)); 34refs.Add(MetadataReference.CreateFromFile(typeof(IEnrichmentTagCollector).Assembly.Location)); 35refs.Add(MetadataReference.CreateFromFile(typeof(DataClassification).Assembly.Location)); 36refs.Add(MetadataReference.CreateFromFile(typeof(PrivateDataAttribute).Assembly.Location)); 37refs.Add(MetadataReference.CreateFromFile(typeof(BigInteger).Assembly.Location));
test\Generators\Shared\RoslynTestUtils.cs (4)
64refs.Add(MetadataReference.CreateFromFile(corelib)); 65refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "netstandard.dll"))); 66refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "System.Runtime.dll"))); 73refs.Add(MetadataReference.CreateFromFile(r.Location));
Microsoft.Gen.Metrics.Unit.Tests (4)
test\Generators\Shared\RoslynTestUtils.cs (4)
64refs.Add(MetadataReference.CreateFromFile(corelib)); 65refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "netstandard.dll"))); 66refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "System.Runtime.dll"))); 73refs.Add(MetadataReference.CreateFromFile(r.Location));
Microsoft.Gen.MetricsReports.Unit.Tests (4)
test\Generators\Shared\RoslynTestUtils.cs (4)
64refs.Add(MetadataReference.CreateFromFile(corelib)); 65refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "netstandard.dll"))); 66refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "System.Runtime.dll"))); 73refs.Add(MetadataReference.CreateFromFile(r.Location));
Microsoft.ML.CodeAnalyzer.Tests (1)
Helpers\AdditionalMetadataReferences.cs (1)
33return MetadataReference.CreateFromFile(location, documentation: documentationProvider);
Microsoft.VisualStudio.LanguageServices (1)
ProjectSystem\VisualStudioWorkspaceImpl.AddMetadataReferenceUndoUnit.cs (1)
43reference = MetadataReference.CreateFromFile(_filePath, documentation: documentationProvider.GetDocumentationProvider(_filePath));
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
ProjectSystemShim\TempPECompilerServiceTests.cs (1)
46return MetadataReference.CreateFromFile(resolvedPath, properties);
Mvc.Analyzers.Test (1)
src\Shared\AnalyzerTesting\TestReferences.cs (1)
56references.Add(MetadataReference.CreateFromFile(assemblyPath));
Mvc.Api.Analyzers.Test (1)
Infrastructure\MvcDiagnosticAnalyzerRunner.cs (1)
39project = project.AddMetadataReference(MetadataReference.CreateFromFile(assembly));
Roslyn.VisualStudio.Next.UnitTests (3)
Remote\SnapshotSerializationTests.cs (1)
58.AddMetadataReference(MetadataReference.CreateFromFile(typeof(object).Assembly.Location))
Services\ServiceHubServicesTests.cs (2)
361metadataReferences: [MetadataReference.CreateFromFile(file.Path)]) 1728.AddMetadataReference(MetadataReference.CreateFromFile(typeof(object).Assembly.Location))
StackDepthTest (1)
Program.cs (1)
80var reference = MetadataReference.CreateFromFile(@"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\mscorlib.dll");
System.Windows.Forms.Design.Tests (3)
System\Resources\Tools\CodeDomCompileHelper.cs (3)
26MetadataReference.CreateFromFile(corelibPath), 27MetadataReference.CreateFromFile(Path.Join(Path.GetDirectoryName(corelibPath), "System.Runtime.dll")), 28MetadataReference.CreateFromFile(typeof(Bitmap).Assembly.Location),
System.Windows.Forms.PrivateSourceGenerators.Tests (1)
EnumValidationTests.cs (1)
299references.Add(MetadataReference.CreateFromFile(assembly.Location));
WinShimmer (3)
Program.cs (3)
46MetadataReference.CreateFromFile(typeof(object).Assembly.Location), 47MetadataReference.CreateFromFile(typeof(Enumerable).Assembly.Location), 48MetadataReference.CreateFromFile(typeof(ProcessStartInfo).Assembly.Location)