6 overrides of Location
Microsoft.AspNetCore.Mvc.Core.Test (1)
ApplicationParts\RelatedAssemblyPartTest.cs (1)
91public override string Location => LocationSettable;
Microsoft.Extensions.FileProviders.Embedded.Tests (1)
TestAssembly.cs (1)
62public override string Location => null;
System.Private.CoreLib (2)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\AssemblyBuilder.cs (1)
58public override string Location => string.Empty;
src\System\Reflection\RuntimeAssembly.cs (1)
521public override string Location
System.Reflection.Context (1)
System\Reflection\Context\Delegation\DelegatingAssembly.cs (1)
27public override string Location
System.Reflection.MetadataLoadContext (1)
System\Reflection\TypeLoading\Assemblies\RoAssembly.cs (1)
47public abstract override string Location { get; }
574 references to Location
Aspire.Dashboard.Tests (1)
Integration\Playwright\Infrastructure\DashboardServerFixture.cs (1)
43var currentAssemblyDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!;
Aspire.Hosting.Analyzers.Tests (1)
AnalyzerTest.cs (1)
42TrimAssemblyExtension(typeof(DistributedApplication).Assembly.Location)
Aspire.RuntimeIdentifier.Tool (1)
Program.cs (1)
17RootCommand rootCommand = new("Aspire.RuntimeIdentifier.Tool v" + FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).ProductVersion)
BuildActionTelemetryTable (1)
Program.cs (1)
24private static readonly string s_executingPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!;
BuildValidator (1)
IldasmUtilities.cs (1)
27var directory = Path.GetDirectoryName(typeof(IldasmUtilities).GetTypeInfo().Assembly.Location) ?? throw new DirectoryNotFoundException();
ConfigurationSchemaGenerator.Tests (24)
GeneratorTests.cs (24)
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) 1357ConfigSchemaGenerator.CreateMetadataReference(typeof(IJsonLineInfo).Assembly.Location) 1597typeof(GeneratorTests).Assembly.Location,
dotnet-getdocument (1)
Commands\InvokeCommand.cs (1)
43var thisPath = Path.GetFullPath(Path.GetDirectoryName(typeof(InvokeCommand).Assembly.Location));
dotnet-svcutil.xmlserializer (3)
Microsoft\Tools\ServiceModel\SvcUtil\InputModule.cs (2)
240ToolConsole.WriteWarning(SR.Format(SR.WrnCouldNotLoadTypesFromReferenceAssemblyAt, assembly.Location)); 249throw new ToolInputException(SR.Format(SR.ErrCouldNotLoadTypesFromAssemblyAt, assembly.Location));
Microsoft\Tools\ServiceModel\SvcUtil\Options.cs (1)
368throw new ToolOptionException(SR.Format(SR.ErrDuplicateReferenceValues, Options.Cmd.Reference, assembly.Location));
dotnet-svcutil.xmlserializer.IntegrationTests (2)
SvcutilTests.cs (2)
23string testassemblypath = Assembly.GetExecutingAssembly().Location; 27Tool.Main(new string[] { Assembly.GetExecutingAssembly().Location, $"--out:{outputFile}", $"--smreference:{smassemblypath}", $"--quiet"});
dotnet-svcutil-lib (6)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeExporter.cs (1)
127string assemblyName = System.IO.Path.GetFileName(assembly.Location);
Metadata\ServiceDescriptor.cs (1)
113string toolPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
Shared\ProjectPropertyResolver.cs (1)
146var dotnetDir = Path.GetDirectoryName(typeof(int).Assembly.Location);
Tool.cs (1)
59_fullPath = typeof(Tool).GetTypeInfo().Assembly.Location;
TypeLoader.cs (2)
71warning = string.Format(SR.ErrCouldNotLoadTypesFromAssemblyAtFormat, assembly.Location); 80warning = string.Format(SR.WrnCouldNotLoadTypesFromReferenceAssemblyAtFormat, assembly.Location);
dotnet-user-jwts (1)
src\Tools\Shared\SecretsHelpers\ProjectIdResolver.cs (1)
135var assemblyDir = Path.GetDirectoryName(typeof(ProjectIdResolver).Assembly.Location);
dotnet-user-secrets (1)
src\Tools\Shared\SecretsHelpers\ProjectIdResolver.cs (1)
135var assemblyDir = Path.GetDirectoryName(typeof(ProjectIdResolver).Assembly.Location);
GetDocument.Insider (1)
Commands\GetDocumentCommand.cs (1)
67.Except([Path.GetFullPath(thisAssembly.Location)])
HttpStress (2)
Program.cs (2)
374Console.WriteLine(" .NET Core: " + Path.GetFileName(Path.GetDirectoryName(typeof(object).Assembly.Location))); 375Console.WriteLine(" ASP.NET Core: " + Path.GetFileName(Path.GetDirectoryName(typeof(IWebHostBuilder).Assembly.Location)));
IdeCoreBenchmarks (3)
CSharpIdeAnalyzerBenchmarks.cs (1)
49var analyzerAssemblyPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Microsoft.CodeAnalysis.CSharp.Features.dll");
IncrementalAnalyzerBenchmarks.cs (1)
47var analyzerAssemblyPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Microsoft.CodeAnalysis.Features.dll");
SwitchStatementBenchmarks.cs (1)
71solution = solution.AddMetadataReference(projectId, MetadataReference.CreateFromFile(typeof(object).Assembly.Location));
IIS.Tests (1)
Utilities\TestServer.cs (1)
33internal static string BasePath => Path.Combine(Path.GetDirectoryName(typeof(TestServer).Assembly.Location),
illink (1)
ILLink.RoslynAnalyzer (1)
src\tools\illink\src\ILLink.Shared\TrimAnalysis\IntrinsicId.cs (1)
299 /// <see cref="System.Reflection.Assembly.Location"/>
ILLink.Tasks (1)
LinkTask.cs (1)
269 var taskDirectory = Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location);
InteractiveHost.UnitTests (4)
InteractiveHostCoreInitTests.cs (1)
32var dir = Path.GetDirectoryName(typeof(InteractiveHostCoreInitTests).Assembly.Location);
InteractiveHostDesktopTests.cs (2)
259await Host.ExecuteFileAsync(typeof(Process).Assembly.Location); 262Assert.True(errorOut.StartsWith(typeof(Process).Assembly.Location + "(1,3):", StringComparison.Ordinal), "Error output should start with file name, line and column");
TestUtils.cs (1)
11public static readonly string HostRootPath = Path.Combine(Path.GetDirectoryName(typeof(TestUtils).Assembly.Location)!, "Host");
InteropWebsite (1)
Program.cs (1)
57var basePath = Path.GetDirectoryName(typeof(Program).Assembly.Location);
Microsoft.Analyzers.Extra.Tests (6)
Resources\RoslynTestUtils.cs (2)
35var corelib = Assembly.GetAssembly(typeof(object))!.Location; 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 (2)
Resources\RoslynTestUtils.cs (2)
35var corelib = Assembly.GetAssembly(typeof(object))!.Location; 50refs.Add(MetadataReference.CreateFromFile(r.Location));
Microsoft.AspNetCore.Analyzer.Testing (1)
DiagnosticProject.cs (1)
59new AnalyzerFileReference(analyzerReference.Assembly.Location, AssemblyLoader.Instance));
Microsoft.AspNetCore.App.Analyzers.Test (39)
Verifiers\CSharpAnalyzerVerifier.cs (39)
65TrimAssemblyExtension(typeof(System.IO.Pipelines.PipeReader).Assembly.Location), 66TrimAssemblyExtension(typeof(Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer).Assembly.Location), 67TrimAssemblyExtension(typeof(Microsoft.AspNetCore.Authorization.IAuthorizeData).Assembly.Location), 68TrimAssemblyExtension(typeof(Microsoft.AspNetCore.Mvc.ModelBinding.IBinderTypeProviderMetadata).Assembly.Location), 69TrimAssemblyExtension(typeof(Microsoft.AspNetCore.Mvc.BindAttribute).Assembly.Location), 70TrimAssemblyExtension(typeof(Microsoft.AspNetCore.Hosting.WebHostBuilderExtensions).Assembly.Location), 71TrimAssemblyExtension(typeof(Microsoft.AspNetCore.Hosting.WebHostBuilderKestrelExtensions).Assembly.Location), 72TrimAssemblyExtension(typeof(Microsoft.Extensions.Hosting.IHostBuilder).Assembly.Location), 73TrimAssemblyExtension(typeof(Microsoft.Extensions.Hosting.HostingHostBuilderExtensions).Assembly.Location), 74TrimAssemblyExtension(typeof(Microsoft.AspNetCore.Builder.ConfigureHostBuilder).Assembly.Location), 75TrimAssemblyExtension(typeof(Microsoft.AspNetCore.Builder.ConfigureWebHostBuilder).Assembly.Location), 76TrimAssemblyExtension(typeof(Microsoft.AspNetCore.Builder.EndpointRoutingApplicationBuilderExtensions).Assembly.Location), 77TrimAssemblyExtension(typeof(Microsoft.AspNetCore.Builder.RateLimiterEndpointConventionBuilderExtensions).Assembly.Location), 78TrimAssemblyExtension(typeof(Microsoft.AspNetCore.Builder.CorsEndpointConventionBuilderExtensions).Assembly.Location), 79TrimAssemblyExtension(typeof(Microsoft.Extensions.DependencyInjection.OutputCacheConventionBuilderExtensions).Assembly.Location), 80TrimAssemblyExtension(typeof(Microsoft.AspNetCore.Builder.EndpointRouteBuilderExtensions).Assembly.Location), 81TrimAssemblyExtension(typeof(Microsoft.AspNetCore.Builder.AuthorizationEndpointConventionBuilderExtensions).Assembly.Location), 82TrimAssemblyExtension(typeof(Microsoft.AspNetCore.Mvc.AutoValidateAntiforgeryTokenAttribute).Assembly.Location), 83TrimAssemblyExtension(typeof(Microsoft.AspNetCore.Authorization.AllowAnonymousAttribute).Assembly.Location), 84TrimAssemblyExtension(typeof(Microsoft.AspNetCore.Routing.RouteData).Assembly.Location), 85TrimAssemblyExtension(typeof(Microsoft.AspNetCore.Components.ComponentBase).Assembly.Location), 86TrimAssemblyExtension(typeof(Microsoft.AspNetCore.Components.ParameterAttribute).Assembly.Location), 87TrimAssemblyExtension(typeof(Microsoft.AspNetCore.Http.IResult).Assembly.Location), 88TrimAssemblyExtension(typeof(Microsoft.AspNetCore.Http.IHeaderDictionary).Assembly.Location), 89TrimAssemblyExtension(typeof(Microsoft.AspNetCore.Http.HeaderDictionary).Assembly.Location), 90TrimAssemblyExtension(typeof(Microsoft.AspNetCore.Http.HttpRequestJsonExtensions).Assembly.Location), 91TrimAssemblyExtension(typeof(Microsoft.AspNetCore.Hosting.HostingAbstractionsWebHostBuilderExtensions).Assembly.Location), 92TrimAssemblyExtension(typeof(Microsoft.Extensions.Primitives.StringValues).Assembly.Location), 93TrimAssemblyExtension(typeof(Microsoft.Extensions.Logging.ILoggingBuilder).Assembly.Location), 94TrimAssemblyExtension(typeof(Microsoft.Extensions.Logging.ConsoleLoggerExtensions).Assembly.Location), 95TrimAssemblyExtension(typeof(Microsoft.Extensions.DependencyInjection.IServiceCollection).Assembly.Location), 96TrimAssemblyExtension(typeof(Microsoft.Extensions.DependencyInjection.AntiforgeryServiceCollectionExtensions).Assembly.Location), 97TrimAssemblyExtension(typeof(Microsoft.Extensions.FileProviders.IFileProvider).Assembly.Location), 98TrimAssemblyExtension(typeof(Microsoft.Extensions.Configuration.ConfigurationManager).Assembly.Location), 99TrimAssemblyExtension(typeof(Microsoft.Extensions.Configuration.JsonConfigurationExtensions).Assembly.Location), 100TrimAssemblyExtension(typeof(Microsoft.Extensions.Configuration.IConfigurationBuilder).Assembly.Location), 101TrimAssemblyExtension(typeof(Microsoft.Extensions.Configuration.EnvironmentVariablesExtensions).Assembly.Location), 102TrimAssemblyExtension(typeof(Microsoft.Extensions.DependencyInjection.AuthenticationServiceCollectionExtensions).Assembly.Location), 103TrimAssemblyExtension(typeof(Microsoft.JSInterop.IJSRuntime).Assembly.Location)));
Microsoft.AspNetCore.BrowserTesting (1)
BrowserTestBase.cs (1)
39var basePath = Path.GetDirectoryName(typeof(BrowserTestBase).Assembly.Location);
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.Components.WebAssembly.Server (1)
DebugProxyLauncher.cs (1)
126Path.GetDirectoryName(assembly.Location)!,
Microsoft.AspNetCore.Components.WebView (3)
WebViewManager.cs (3)
299if (string.IsNullOrEmpty(assembly?.Location)) 304var name = Path.GetFileNameWithoutExtension(assembly.Location); 306return Path.Combine(Path.GetDirectoryName(assembly.Location)!, $"{name}.staticwebassets.runtime.json");
Microsoft.AspNetCore.Components.WebView.WindowsForms (1)
BlazorWebView.cs (1)
176 var entryAssemblyLocation = Assembly.GetEntryAssembly()?.Location;
Microsoft.AspNetCore.Components.WebView.Wpf (1)
BlazorWebView.cs (1)
259 var entryAssemblyLocation = Assembly.GetEntryAssembly()?.Location;
Microsoft.AspNetCore.Components.WebViewE2E.Test (3)
BasicBlazorHybridTest.cs (2)
22Console.WriteLine($"Current assembly: {typeof(Program).Assembly.Location}"); 23var thisProgramDir = Path.GetDirectoryName(typeof(Program).Assembly.Location);
WebViewManagerE2ETests.cs (1)
24var photinoTestProgramExePath = typeof(WebViewManagerE2ETests).Assembly.Location;
Microsoft.AspNetCore.Hosting (1)
StaticWebAssets\StaticWebAssetsLoader.cs (1)
76var assemblyLocation = assembly.Location;
Microsoft.AspNetCore.Hosting.Tests (2)
StaticWebAssets\ManifestStaticWebAssetsFileProviderTests.cs (2)
20manifest.ContentRoots = new[] { Path.GetDirectoryName(typeof(ManifestStaticWebAssetsFileProviderTest).Assembly.Location) }; 616manifest.ContentRoots = new[] { Path.GetDirectoryName(typeof(ManifestStaticWebAssetsFileProviderTest).Assembly.Location) };
Microsoft.AspNetCore.Http.Extensions.Tests (22)
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
336if (resolveReferencePath.Equals(typeof(RequestDelegateGenerator.RequestDelegateGenerator).Assembly.Location, StringComparison.OrdinalIgnoreCase))
ValidationsGenerator\ValidationsGeneratorTestBase.cs (21)
40.Where(assembly => !assembly.IsDynamic && !string.IsNullOrWhiteSpace(assembly.Location)) 41.Select(assembly => MetadataReference.CreateFromFile(assembly.Location)) 44MetadataReference.CreateFromFile(typeof(WebApplicationBuilder).Assembly.Location), 45MetadataReference.CreateFromFile(typeof(EndpointRouteBuilderExtensions).Assembly.Location), 46MetadataReference.CreateFromFile(typeof(IApplicationBuilder).Assembly.Location), 47MetadataReference.CreateFromFile(typeof(Microsoft.AspNetCore.Mvc.ApiExplorer.IApiDescriptionProvider).Assembly.Location), 48MetadataReference.CreateFromFile(typeof(Microsoft.AspNetCore.Mvc.ControllerBase).Assembly.Location), 49MetadataReference.CreateFromFile(typeof(MvcCoreMvcBuilderExtensions).Assembly.Location), 50MetadataReference.CreateFromFile(typeof(TypedResults).Assembly.Location), 51MetadataReference.CreateFromFile(typeof(System.Text.Json.Nodes.JsonArray).Assembly.Location), 52MetadataReference.CreateFromFile(typeof(Console).Assembly.Location), 53MetadataReference.CreateFromFile(typeof(Uri).Assembly.Location), 54MetadataReference.CreateFromFile(typeof(System.ComponentModel.DataAnnotations.ValidationAttribute).Assembly.Location), 55MetadataReference.CreateFromFile(typeof(RouteData).Assembly.Location), 56MetadataReference.CreateFromFile(typeof(IFeatureCollection).Assembly.Location), 57MetadataReference.CreateFromFile(typeof(ValidateOptionsResult).Assembly.Location), 58MetadataReference.CreateFromFile(typeof(IHttpMethodMetadata).Assembly.Location), 59MetadataReference.CreateFromFile(typeof(IResult).Assembly.Location), 60MetadataReference.CreateFromFile(typeof(HttpJsonServiceExtensions).Assembly.Location), 61MetadataReference.CreateFromFile(typeof(IValidatableInfoResolver).Assembly.Location), 62MetadataReference.CreateFromFile(typeof(EndpointFilterFactoryContext).Assembly.Location),
Microsoft.AspNetCore.Http.Microbenchmarks (1)
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
336if (resolveReferencePath.Equals(typeof(RequestDelegateGenerator.RequestDelegateGenerator).Assembly.Location, StringComparison.OrdinalIgnoreCase))
Microsoft.AspNetCore.Identity.Test (1)
IdentityUIScriptsTest.cs (1)
171var applicationPath = Path.GetDirectoryName(typeof(IdentityUIScriptsTest).Assembly.Location);
Microsoft.AspNetCore.Mvc.Core (2)
ApplicationParts\RelatedAssemblyAttribute.cs (2)
70var assemblyDirectory = string.IsNullOrEmpty(assembly.Location) ? 72Path.GetDirectoryName(assembly.Location);
Microsoft.AspNetCore.Mvc.FunctionalTests (1)
ErrorPageTests.cs (1)
75options.AdditionalReferencePaths.Add(typeof(string).Assembly.Location);
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
AssemblyPartExtensions.cs (1)
36return new[] { assembly.Location };
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (2)
AssemblyPartExtensionTest.cs (2)
22Assert.Contains(assembly.Location, references); 41Assert.Equal(assembly.Location, actual);
Microsoft.AspNetCore.OpenApi.SourceGenerators.Tests (14)
SnapshotTestHelper.cs (14)
37.Where(assembly => !assembly.IsDynamic && !string.IsNullOrWhiteSpace(assembly.Location)) 38.Select(assembly => MetadataReference.CreateFromFile(assembly.Location)) 41MetadataReference.CreateFromFile(typeof(Builder.WebApplicationBuilder).Assembly.Location), 42MetadataReference.CreateFromFile(typeof(OpenApiOptions).Assembly.Location), 43MetadataReference.CreateFromFile(typeof(Builder.EndpointRouteBuilderExtensions).Assembly.Location), 44MetadataReference.CreateFromFile(typeof(Builder.IApplicationBuilder).Assembly.Location), 45MetadataReference.CreateFromFile(typeof(Mvc.ApiExplorer.IApiDescriptionProvider).Assembly.Location), 46MetadataReference.CreateFromFile(typeof(Mvc.ControllerBase).Assembly.Location), 47MetadataReference.CreateFromFile(typeof(MvcServiceCollectionExtensions).Assembly.Location), 48MetadataReference.CreateFromFile(typeof(MvcCoreMvcBuilderExtensions).Assembly.Location), 49MetadataReference.CreateFromFile(typeof(Http.TypedResults).Assembly.Location), 50MetadataReference.CreateFromFile(typeof(System.Text.Json.Nodes.JsonArray).Assembly.Location), 51MetadataReference.CreateFromFile(typeof(Console).Assembly.Location), 52MetadataReference.CreateFromFile(typeof(Uri).Assembly.Location),
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (2)
src\SignalR\common\Shared\TestCertificates.cs (2)
35var certPath = Path.Combine(Path.GetDirectoryName(Assembly.GetCallingAssembly().Location), "TestCertificates", "testCert.pfx"); 41var certPath = Path.Combine(Path.GetDirectoryName(Assembly.GetCallingAssembly().Location), "TestCertificates", "testCertECC.pfx");
Microsoft.Build (7)
BackEnd\Components\RequestBuilder\AssemblyLoadsTracker.cs (1)
151string assemblyPath = args.LoadedAssembly.IsDynamic ? string.Empty : args.LoadedAssembly.Location;
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (1)
339string realTaskAssemblyLoaction = TaskInstance.GetType().Assembly.Location;
BuildEnvironmentHelper.cs (1)
111msbuildExePath = typeof(BuildEnvironmentHelper).Assembly.Location;
CommunicationsUtilities.cs (1)
108Version fileVersion = new Version(FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion);
LoadedType.cs (1)
40Path = loadedAssembly.Location;
TaskLoader.cs (1)
149loadedType.Type.GetTypeInfo().Assembly.Location);
TypeLoader.cs (1)
54string msbuildDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
Microsoft.Build.BuildCheck.UnitTests (2)
EndToEndTests.cs (1)
35private static string AssemblyLocation { get; } = Path.Combine(Path.GetDirectoryName(typeof(EndToEndTests).Assembly.Location) ?? AppContext.BaseDirectory);
TestProgram.cs (1)
13newArgs.Insert(0, typeof(Program).Assembly.Location);
Microsoft.Build.CommandLine.UnitTests (6)
MSBuildServer_Tests.cs (3)
65<UsingTask TaskName=""ProcessIdTask"" AssemblyFile=""{Assembly.GetExecutingAssembly().Location}"" /> 75<UsingTask TaskName=""SleepingTask"" AssemblyFile=""{Assembly.GetExecutingAssembly().Location}"" /> 310<UsingTask TaskName=""ProcessIdTask"" AssemblyFile=""{Assembly.GetExecutingAssembly().Location}"" />
TestProgram.cs (1)
13newArgs.Insert(0, typeof(Program).Assembly.Location);
XMake_Tests.cs (2)
2705<UsingTask TaskName=""" + typeof(MessageImportanceCheckingTask).FullName + @""" AssemblyFile=""" + Assembly.GetExecutingAssembly().Location + @"""/> 2748string customTaskPath = Assembly.GetExecutingAssembly().Location;
Microsoft.Build.Engine.OM.UnitTests (2)
BuildEnvironmentHelper.cs (1)
111msbuildExePath = typeof(BuildEnvironmentHelper).Assembly.Location;
TestProgram.cs (1)
13newArgs.Insert(0, typeof(Program).Assembly.Location);
Microsoft.Build.Engine.UnitTests (20)
BackEnd\BuildManager_Logging_Tests.cs (1)
38<UsingTask TaskName=""CustomBuildEventTask"" AssemblyFile=""{Assembly.GetExecutingAssembly().Location}"" />
BackEnd\BuildManager_Tests.cs (1)
4398AssemblyFile=""" + Assembly.GetExecutingAssembly().Location + @"""
BackEnd\CustomTaskHelper.cs (1)
64return taskAssembly.Location;
BackEnd\GenerateTemporaryTargetAssembly_Tests.cs (1)
29<UsingTask TaskName=""FailingBuilderTask"" AssemblyFile=""{Assembly.GetExecutingAssembly().Location}"" />
BackEnd\LoggingServicesLogMethod_Tests.cs (1)
1450string taskAssemblyLocation = Assembly.GetExecutingAssembly().Location;
BackEnd\OnError_Tests.cs (1)
583<UsingTask TaskName=""FailingTask"" AssemblyFile=""{Assembly.GetExecutingAssembly().Location}"" />
BackEnd\TaskBuilder_Tests.cs (7)
429<CreateItem Include='{Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)}\**\*.dll'> 567string customTaskPath = Assembly.GetExecutingAssembly().Location; 591string customTaskPath = Assembly.GetExecutingAssembly().Location; 615string customTaskPath = Assembly.GetExecutingAssembly().Location; 640string realTaskPath = Assembly.GetExecutingAssembly().Location; 797string customTaskPath = Assembly.GetExecutingAssembly().Location; 809string customTaskPath = Assembly.GetExecutingAssembly().Location;
BackEnd\TaskExecutionHost_Tests.cs (3)
1039string customTaskPath = Assembly.GetExecutingAssembly().Location; 1059string customTaskPath = Assembly.GetExecutingAssembly().Location; 1100string customTaskPath = Assembly.GetExecutingAssembly().Location;
BackEnd\TaskHostFactory_Tests.cs (1)
101<UsingTask TaskName=""{nameof(TaskBuilderTestTask)}"" AssemblyFile=""{typeof(TaskBuilderTestTask).Assembly.Location}"" TaskFactory=""TaskHostFactory"" />
TerminalLoggerConfiguration_Tests.cs (1)
39_cmd = $"{projectFile.Path} -target:Hello -logger:{typeof(MockLogger).FullName},{typeof(MockLogger).Assembly.Location};ReportTelemetry";
TestProgram.cs (1)
13newArgs.Insert(0, typeof(Program).Assembly.Location);
TypeLoader_Tests.cs (1)
102string currentAssembly = Assembly.GetExecutingAssembly().Location;
Microsoft.Build.Framework (1)
AssemblyUtilities.cs (1)
50return assembly.Location;
Microsoft.Build.Framework.UnitTests (1)
TestProgram.cs (1)
13newArgs.Insert(0, typeof(Program).Assembly.Location);
Microsoft.Build.Tasks.CodeAnalysis (2)
ManagedToolTask.cs (1)
222var buildTaskDirectory = Path.GetDirectoryName(buildTask.Location);
Utilities.cs (1)
167return assembly.Location;
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (11)
CscTests.cs (3)
656var taskPath = Path.GetDirectoryName(typeof(ManagedCompiler).Assembly.Location)!; 669var taskPath = Path.GetDirectoryName(typeof(ManagedCompiler).Assembly.Location)!; 734var taskFilePath = taskAssembly.Location!;
GenerateMSBuildEditorConfigTests.cs (2)
246string executingLocation = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)?.Replace('\\', '/') ?? string.Empty; 280string executingLocation = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)?.Replace('\\', '/') ?? string.Empty;
IntegrationTests.cs (3)
41_buildTaskDll = typeof(ManagedCompiler).Assembly.Location; 52typeof(IntegrationTests).Assembly.Location + ".client-server.log")); 609{ { "MyMSBuildToolsPath", Path.GetDirectoryName(typeof(IntegrationTests).Assembly.Location) } });
TargetTests.cs (1)
902var path = Path.Combine(Path.GetDirectoryName(assembly.Location)!, "Microsoft.Managed.Core.targets");
TestUtilities\DotNetSdkTestBase.cs (2)
152var testBinDirectory = Path.GetDirectoryName(typeof(DotNetSdkTests).Assembly.Location) ?? string.Empty; 227var testBinDirectory = Path.GetDirectoryName(typeof(DotNetSdkTests).Assembly.Location);
Microsoft.Build.Tasks.Core (3)
BuildEnvironmentHelper.cs (1)
111msbuildExePath = typeof(BuildEnvironmentHelper).Assembly.Location;
GetSDKReferenceFiles.cs (1)
1094currentAssembly = Assembly.GetExecutingAssembly().Location;
ManifestUtil\Util.cs (1)
112return Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
Microsoft.Build.Tasks.UnitTests (9)
AddToWin32Manifest_Tests.cs (1)
21Path.GetDirectoryName(typeof(AddToWin32Manifest_Tests).Assembly.Location) ?? AppContext.BaseDirectory,
AssemblyDependency\SuggestedRedirects.cs (1)
471using (var info = new AssemblyInformation(Assembly.GetExecutingAssembly().Location))
MSBuild_Tests.cs (1)
1498<UsingTask TaskName=`{nameof(BuildProjectFileTask)}` AssemblyFile =`{typeof(BuildProjectFileTask).Assembly.Location}` />
ResolveAssemblyReference_CustomCultureTests.cs (1)
19Path.GetDirectoryName(typeof(AddToWin32Manifest_Tests).Assembly.Location) ?? AppContext.BaseDirectory,
ResourceManagement_Tests.cs (1)
134<Reference Include=""{typeof(Enumerable).Assembly.Location}"" />
RoslynCodeTaskFactory_Tests.cs (3)
50string location = Assembly.GetExecutingAssembly().Location; 160<Reference Include=""{typeof(Enumerable).Assembly.Location}"" /> 186<Reference Include=""{typeof(Enumerable).Assembly.Location}"" />
TestProgram.cs (1)
13newArgs.Insert(0, typeof(Program).Assembly.Location);
Microsoft.Build.Utilities.Core (1)
BuildEnvironmentHelper.cs (1)
111msbuildExePath = typeof(BuildEnvironmentHelper).Assembly.Location;
Microsoft.Build.Utilities.UnitTests (1)
TestProgram.cs (1)
13newArgs.Insert(0, typeof(Program).Assembly.Location);
Microsoft.CodeAnalysis (4)
MetadataReference\MetadataReference.cs (2)
354string location = assembly.Location; 378return !assembly.IsDynamic && !string.IsNullOrEmpty(assembly.Location);
SourceGeneration\GeneratorTimerExtensions.cs (2)
36eventSource.StartSingleGeneratorRunTime(type.FullName!, type.Assembly.Location, id); 37return new RunTimer(t => eventSource.StopSingleGeneratorRunTime(type.FullName!, type.Assembly.Location, t.Ticks, id), adjustRunTime);
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Helpers\MefHostServicesHelpers.cs (2)
60var thisAssemblyName = typeof(MefHostServicesHelpers).GetTypeInfo().Assembly.Location; 72return assembly?.Location;
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (18)
CommandLineTests.cs (18)
64Path.GetDirectoryName(typeof(CommandLineTests).GetTypeInfo().Assembly.Location), 68.FirstOrDefault(assembly => !assembly.IsDynamic && assembly.Location.EndsWith("netstandard.dll")).Location; 72var runtimeConfigPath = Path.ChangeExtension(Assembly.GetExecutingAssembly().Location, "runtimeconfig.json"); 292"/analyzer:" + Assembly.GetExecutingAssembly().Location, 514AssertEx.Equal(new[] { typeof(object).Assembly.Location, @"..\v4.0.30319\System.dll", @".\System.Data.dll" }, references); 2808var csc = CreateCSharpCompiler(null, dir.Path, new[] { "/nologo", "/preferreduilang:en", "/t:library", "/a:" + typeof(object).Assembly.Location, "a.cs" }); 2925var csc = CreateCSharpCompiler(null, dir.Path, new[] { "/nologo", "/preferreduilang:en", "/t:library", "/a:" + Assembly.GetExecutingAssembly().Location, "a.cs" }); 2961var csc = CreateCSharpCompiler(null, dir.Path, new[] { "/nologo", "/preferreduilang:en", "/t:library", "/a:" + Assembly.GetExecutingAssembly().Location, "a.cs", "/ruleset:" + ruleSetFile.Path }); 2997"/a:" + Assembly.GetExecutingAssembly().Location, "a.cs", 3008"/a:" + Assembly.GetExecutingAssembly().Location, "a.cs", 3516"/a:" + Assembly.GetExecutingAssembly().Location, "a.cs", 3527"/a:" + Assembly.GetExecutingAssembly().Location, "a.cs", 9498var args = new List<string>() { "/reportanalyzer", "/t:library", "/a:" + typeof(DoNothingGenerator).Assembly.Location, srcFile.Path }; 10570args = args.Append("/a:" + Assembly.GetExecutingAssembly().Location); 12026dir.CopyFile(typeof(Compilation).Assembly.Location); 12036dir.CopyFile(typeof(CSharpCompilation).Assembly.Location); 15042"/analyzer:" + Assembly.GetExecutingAssembly().Location,
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (3)
Completion\CompletionProviders\AwaitCompletionProviderTests.cs (1)
355var valueTaskAssembly = typeof(ValueTask).Assembly.Location;
Formatting\CodeCleanupTests.cs (2)
886new AnalyzerFileReference(typeof(CSharpCompilerDiagnosticAnalyzer).Assembly.Location, TestAnalyzerAssemblyLoader.LoadFromFile), 887new AnalyzerFileReference(typeof(UseExpressionBodyDiagnosticAnalyzer).Assembly.Location, TestAnalyzerAssemblyLoader.LoadFromFile)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (2)
ConvertForEachToFor\ConvertForEachToForTests.cs (1)
1131""" + typeof(ImmutableArray<>).Assembly.Location + """
SemanticSearch\CSharpSemanticSearchServiceTests.cs (1)
24private static readonly string s_referenceAssembliesDir = Path.Combine(Path.GetDirectoryName(typeof(CSharpSemanticSearchServiceTests).Assembly.Location!)!, "SemanticSearchRefs");
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (15)
CsiTests.cs (1)
24private string CsiPath => typeof(Csi).GetTypeInfo().Assembly.Location;
InteractiveSessionReferencesTests.cs (14)
51var s1 = s0.ContinueWithAsync($"#r \"{typeof(Process).Assembly.Location}\""); 75#r ""{typeof(Process).Assembly.Location}"" 126#r ""{typeof(System.Xml.Serialization.IXmlSerializable).GetTypeInfo().Assembly.Location}"" 187#r ""{typeof(System.Data.DataSet).Assembly.Location}"" 189#r ""{typeof(System.Xml.Serialization.IXmlSerializable).Assembly.Location}"" 213var options3 = options2.AddReferences(typeof(System.Windows.Forms.Form).Assembly.Location); 231#r ""{typeof(System.Xml.Serialization.IXmlSerializable).Assembly.Location}"" 507typeof(object).GetTypeInfo().Assembly.Location, 508typeof(C).Assembly.Location, 509typeof(C).Assembly.Location, 510typeof(C).Assembly.Location, 516#r ""{typeof(C).Assembly.Location}"" 517#r ""{typeof(C).Assembly.Location}"" 543typeof(object).GetTypeInfo().Assembly.Location,
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
SymbolDisplay\SymbolDisplayTests.cs (1)
3139var hostReference = MetadataReference.CreateFromFile(typeof(ScriptGlobals).Assembly.Location);
Symbols\TypeResolutionTests.cs (1)
122MetadataReference.CreateFromImage(File.ReadAllBytes(typeof(TypeTests).GetTypeInfo().Assembly.Location))
Microsoft.CodeAnalysis.EditorFeatures (1)
Interactive\InteractiveSession.cs (1)
99_hostDirectory = Path.Combine(Path.GetDirectoryName(typeof(InteractiveSession).Assembly.Location)!, "InteractiveHost");
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Diagnostics\IDEDiagnosticIDConfigurationTests.cs (1)
32var analyzerReference = new AnalyzerFileReference(assembly.Location, TestAnalyzerAssemblyLoader.LoadFromFile);
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (10)
CodeFixes\CodeFixServiceTests.vb (2)
86Dim projectAnalyzerReference = CreateAnalyzerFileReference(_assembly.Location) 156Dim projectAnalyzerReference = CreateAnalyzerFileReference(_assembly.Location)
Diagnostics\AbstractCrossLanguageUserDiagnosticTest.vb (2)
143New AnalyzerFileReference(DiagnosticExtensions.GetCompilerDiagnosticAnalyzer(LanguageNames.CSharp).GetType().Assembly.Location, TestAnalyzerAssemblyLoader.LoadFromFile), 144New AnalyzerFileReference(DiagnosticExtensions.GetCompilerDiagnosticAnalyzer(LanguageNames.VisualBasic).GetType().Assembly.Location, TestAnalyzerAssemblyLoader.LoadFromFile)
Diagnostics\AddMissingReference\AddMissingReferenceTests.vb (4)
125<MetadataReference><%= s_windowsBaseAssembly.Location %></MetadataReference> 141<MetadataReference><%= s_presentationCoreAssembly.Location %></MetadataReference> 163<MetadataReference><%= s_windowsBaseAssembly.Location %></MetadataReference> 179<MetadataReference><%= s_presentationCoreAssembly.Location %></MetadataReference>
Diagnostics\DiagnosticServiceTests.vb (2)
428Dim analyzerReference1 = CreateAnalyzerFileReference(Assembly.GetExecutingAssembly().Location) 432Dim analyzerReference2 = CreateAnalyzerFileReference(Assembly.GetExecutingAssembly().Location)
Microsoft.CodeAnalysis.ExternalAccess.Razor.UnitTests (1)
RazorAnalyzerAssemblyResolverTests.cs (1)
184Assert.Equal(serviceHubFolder, Path.GetDirectoryName(assembly1.Location));
Microsoft.CodeAnalysis.Features (2)
Diagnostics\DiagnosticAnalyzerExtensions.cs (1)
34return (analyzer.GetAnalyzerId(), GetAnalyzerVersion(typeInfo.Assembly.Location));
SemanticSearch\SemanticSearchUtilities.cs (1)
32private static readonly string s_thisAssemblyDirectory = Path.GetDirectoryName(typeof(SemanticSearchUtilities).Assembly.Location!)!;
Microsoft.CodeAnalysis.InteractiveHost (5)
Interactive\Core\InteractiveHost.LazyRemoteService.cs (2)
83metadataReferencePaths: [typeof(object).Assembly.Location, typeof(InteractiveScriptGlobals).Assembly.Location],
Interactive\Core\InteractiveHost.Service.cs (2)
512metadataReferencePaths.Add(typeof(object).Assembly.Location); 513metadataReferencePaths.Add(typeof(InteractiveScriptGlobals).Assembly.Location);
Interactive\Core\InteractiveHostPlatformInfo.cs (1)
29private static readonly string s_hostDirectory = PathUtilities.GetDirectoryName(typeof(InteractiveHostPlatformInfo).Assembly.Location)!;
Microsoft.CodeAnalysis.LanguageServer (1)
Program.cs (1)
97var cacheDirectory = Path.Combine(Path.GetDirectoryName(typeof(Program).Assembly.Location)!, "cache");
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Features\DecompiledSource\CSharpCodeDecompilerDecompilationService.cs (1)
24private static readonly FileVersionInfo s_decompilerVersion = FileVersionInfo.GetVersionInfo(typeof(CSharpDecompiler).Assembly.Location);
Microsoft.CodeAnalysis.LanguageServer.UnitTests (1)
ExportProviderBuilderTests.cs (1)
131MetadataReference.CreateFromFile(typeof(System.ComponentModel.Composition.ExportAttribute).Assembly.Location)
Microsoft.CodeAnalysis.Remote.ServiceHub.UnitTests (3)
RemoteAnalyzerAssemblyLoaderTests.cs (3)
29var remoteAssemblyLocation = remoteAssemblyInCurrentAlc.Location; 48var featuresAssemblyLocation = featuresAssemblyInCurrentAlc.Location; 67var compilerAssemblyLocation = compilerAssemblyInCurrentAlc.Location;
Microsoft.CodeAnalysis.Scripting (2)
src\Compilers\Shared\GlobalAssemblyCacheHelpers\MonoGlobalAssemblyCache.cs (2)
29var corlibAssemblyFile = typeof(object).Assembly.Location; 32var systemAssemblyFile = typeof(Uri).Assembly.Location;
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (1)
MetadataShadowCopyProviderTests.cs (1)
115string mscorlib = typeof(object).Assembly.Location;
Microsoft.CodeAnalysis.Test.Utilities (4)
AssemblyLoadTestFixture.cs (2)
342var compilerReference = MetadataReference.CreateFromFile(typeof(Microsoft.CodeAnalysis.SyntaxNode).Assembly.Location); 416var realSciReference = MetadataReference.CreateFromFile(typeof(ImmutableArray).Assembly.Location);
Compilation\RuntimeUtilities.cs (1)
79return type.GetTypeInfo().Assembly.Location;
Platform\CoreClr\AssemblyLoadContextUtils.cs (1)
27_probingPath = probingPath ?? Path.GetDirectoryName(typeof(SimpleAssemblyLoadContext).Assembly.Location)!;
Microsoft.CodeAnalysis.UnitTests (26)
AnalyzerAssemblyLoaderTests.cs (12)
418.Select(x => x.Location) 425Assert.All(assemblies, x => x.Location.StartsWith(shadowLoader.BaseDirectory, StringComparison.Ordinal)); 952Assert.NotEqual(delta2B.Location, delta2.Location); 953Assert.Equal(loader.GetResolvedAnalyzerPath(testFixture.Delta2), delta2.Location); 954Assert.Equal(loader.GetResolvedAnalyzerPath(testFixture.Delta2B), delta2B.Location); 1171var compilerReference = MetadataReference.CreateFromFile(typeof(SyntaxNode).Assembly.Location); 1172var immutableReference = MetadataReference.CreateFromFile(typeof(ImmutableArray).Assembly.Location); 1426File.Copy(assembly.Location, destFile, overwrite: true); 1658_ = alc.LoadFromAssemblyPath(typeof(AnalyzerAssemblyLoader).GetTypeInfo().Assembly.Location); 1753loader.AddDependencyLocation(assembly.Location); 1754Assembly loaded = loader.LoadFromPath(assembly.Location);
Analyzers\AnalyzerFileReferenceTests.cs (9)
98AnalyzerFileReference reference = CreateAnalyzerFileReference(Assembly.GetExecutingAssembly().Location); 124AnalyzerFileReference reference = CreateAnalyzerFileReference(Assembly.GetExecutingAssembly().Location); 145AnalyzerFileReference reference = CreateAnalyzerFileReference(Assembly.GetExecutingAssembly().Location); 367AnalyzerFileReference reference = CreateAnalyzerFileReference(Assembly.GetExecutingAssembly().Location); 391AnalyzerFileReference reference = CreateAnalyzerFileReference(Assembly.GetExecutingAssembly().Location); 404AnalyzerFileReference reference = CreateAnalyzerFileReference(Assembly.GetExecutingAssembly().Location); 426AnalyzerFileReference reference = CreateAnalyzerFileReference(Assembly.GetExecutingAssembly().Location); 517AnalyzerFileReference reference = CreateAnalyzerFileReference(Assembly.GetExecutingAssembly().Location); 550AnalyzerFileReference reference = CreateAnalyzerFileReference(Assembly.GetExecutingAssembly().Location);
CompilerResolverTests.cs (1)
30AssemblyInCompilerContext = CompilerContext.LoadFromAssemblyPath(typeof(AnalyzerAssemblyLoader).Assembly.Location);
MetadataReferences\MetadataReferenceTests.cs (4)
209Assert.Equal(assembly.Location, r.FilePath); 210Assert.Equal(assembly.Location, r.Display); 226Assert.Equal(assembly.Location, r.FilePath); 227Assert.Equal(assembly.Location, r.Display);
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (19)
CommandLineTests.vb (19)
40Path.GetDirectoryName(GetType(CommandLineTests).Assembly.Location), 119"/analyzer:" + Assembly.GetExecutingAssembly().Location, 2620Dim vbc = New MockVisualBasicCompiler(Nothing, dir.Path, {"/nologo", "/preferreduilang:en", "/t:library", "/a:" + GetType(Object).Assembly.Location, "a.vb"}) 2638Dim vbc = New MockVisualBasicCompiler(Nothing, dir.Path, {"/nologo", "/preferreduilang:en", "/t:library", "/a:" + Assembly.GetExecutingAssembly().Location, "a.vb"}) 2671Dim vbc = New MockVisualBasicCompiler(Nothing, dir.Path, {"/nologo", "/t:library", "/a:" + Assembly.GetExecutingAssembly().Location, "a.vb", "/ruleset:" + ruleSetFile.Path}) 2704"/a:" + Assembly.GetExecutingAssembly().Location, "a.vb", 2718"/a:" + Assembly.GetExecutingAssembly().Location, "a.vb", 2754"/a:" + Assembly.GetExecutingAssembly().Location, "a.vb", 2769"/a:" + Assembly.GetExecutingAssembly().Location, "a.vb", 2805Dim vbc = New MockVisualBasicCompiler(Nothing, dir.Path, {"/nologo", "/t:library", "/a:" + Assembly.GetExecutingAssembly().Location, "a.vb", "/ruleset:" + ruleSetFile.Path}) 7164Dim corlibLocation = GetType(Object).Assembly.Location 7230Dim corlibLocation = GetType(Object).Assembly.Location 7939args = args.Append("/a:" + Assembly.GetExecutingAssembly().Location) 9012Dim vbc = New MockVisualBasicCompiler(Nothing, _baseDirectory, {skipAnalyzersFlag, "/reportanalyzer", "/t:library", "/a:" + Assembly.GetExecutingAssembly().Location, source}) 9114"/additionalfile:" & Assembly.GetExecutingAssembly.Location, ' Non-text file specified as an additional text file 9134IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly.Location), 9135Assembly.GetExecutingAssembly.Location), 9682dir.CopyFile(GetType(Compilation).Assembly.Location) 9692dir.CopyFile(GetType(VisualBasicCompilation).Assembly.Location)
Microsoft.CodeAnalysis.Workspaces (3)
Log\RoslynEventSource.cs (1)
113var fvi = FileVersionInfo.GetVersionInfo(assembly.Location);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Helpers\MefHostServicesHelpers.cs (2)
60var thisAssemblyName = typeof(MefHostServicesHelpers).GetTypeInfo().Assembly.Location; 72return assembly?.Location;
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
MSBuild\BuildHostProcessManager.cs (2)
190var buildHostPath = Path.Combine(Path.GetDirectoryName(typeof(BuildHostProcessManager).Assembly.Location)!, "BuildHost-netcore", "Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.dll"); 225var netFrameworkBuildHost = Path.Combine(Path.GetDirectoryName(typeof(BuildHostProcessManager).Assembly.Location)!, "BuildHost-net472", "Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.exe");
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (2)
NewlyCreatedProjectsFromDotNetNew.cs (1)
50var assemblyLocation = typeof(DotNetSdkMSBuildInstalled).Assembly.Location;
Utilities\DotNetSdkMSBuildInstalled.cs (1)
29var assemblyLocation = typeof(DotNetSdkMSBuildInstalled).Assembly.Location;
Microsoft.CodeAnalysis.Workspaces.UnitTests (18)
CommandLineProject\CommandLineProjectTests.cs (4)
146var pathToAssembly = typeof(object).Assembly.Location; 161var pathToAssembly = typeof(object).Assembly.Location; 174var pathToAssembly = typeof(object).Assembly.Location; 186var pathToAssembly = typeof(object).Assembly.Location;
SolutionTests\SolutionTests.cs (1)
46private static readonly string s_projectDir = Path.GetDirectoryName(typeof(SolutionTests).Assembly.Location)!;
SymbolKeyTests.cs (2)
1475MetadataReference.CreateFromFile(typeof(object).Assembly.Location), 1476MetadataReference.CreateFromFile(typeof(Enumerable).Assembly.Location)
UtilityTest\XmlDocumentationProviderTests.cs (1)
19var roslynCompilersLocation = typeof(Compilation).Assembly.Location;
WorkspaceTests\WorkspaceReferenceTests.cs (10)
26metadataReferences: [PortableExecutableReference.CreateFromFile(typeof(object).Assembly.Location)]); 55metadataReferences: [PortableExecutableReference.CreateFromFile(typeof(object).Assembly.Location)]); 66metadataReferences: [PortableExecutableReference.CreateFromFile(typeof(object).Assembly.Location)]); 95metadataReferences: [PortableExecutableReference.CreateFromFile(typeof(object).Assembly.Location)]); 106metadataReferences: [PortableExecutableReference.CreateFromFile(typeof(object).Assembly.Location)]); 135metadataReferences: [PortableExecutableReference.CreateFromFile(typeof(object).Assembly.Location)]); 146metadataReferences: [PortableExecutableReference.CreateFromFile(typeof(object).Assembly.Location)]); 179metadataReferences: [PortableExecutableReference.CreateFromFile(typeof(object).Assembly.Location)]); 190PortableExecutableReference.CreateFromFile(typeof(object).Assembly.Location), 191PortableExecutableReference.CreateFromFile(typeof(Workspace).Assembly.Location),
Microsoft.Data.Analysis.Interactive (1)
DataFrameKernelExtension.cs (1)
31await cSharpKernel.SendAsync(new SubmitCode($@"#r ""{typeof(DataFrameKernelExtension).Assembly.Location}""
Microsoft.Data.Analysis.Tests (2)
DataFrame.IOTests.cs (1)
1338Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + "/";
test\Microsoft.ML.TestFramework\BaseTestClass.cs (1)
55var currentAssemblyLocation = new FileInfo(typeof(BaseTestClass).Assembly.Location);
Microsoft.DotNet.Arcade.Sdk.Tests (4)
GetAssemblyFullNameTests.cs (4)
24new TaskItem("Item", new Dictionary<string, string> { { "SomePath", objectAssembly.Location } }), 25new TaskItem("Item", new Dictionary<string, string> { { "SomePath", thisAssembly.Location } }), 52new TaskItem(objectAssembly.Location), 53new TaskItem(thisAssembly.Location),
Microsoft.DotNet.AsmDiff (1)
DiffCSharpWriter.cs (1)
379string appDirectory = Path.GetDirectoryName(entryAssembly.Location);
Microsoft.DotNet.Build.Manifest.Tests (1)
TestInputs\TestInputs.cs (1)
13Path.GetDirectoryName(typeof(TestInputs).Assembly.Location),
Microsoft.DotNet.Build.Tasks.Feed.Tests (1)
src\Microsoft.DotNet.Build.Manifest.Tests\TestInputs\TestInputs.cs (1)
13Path.GetDirectoryName(typeof(TestInputs).Assembly.Location),
Microsoft.DotNet.Build.Tasks.TargetFramework (2)
src\Common\Internal\AssemblyResolver.cs (2)
43assemblyPath = args.RequestingAssembly?.Location; 55assemblyPath = Assembly.GetExecutingAssembly().Location;
Microsoft.DotNet.Build.Tasks.Templating.Tests (1)
GenerateFileFromTemplateTests.cs (1)
91Path.GetDirectoryName(typeof(GenerateFileFromTemplateTests).Assembly.Location),
Microsoft.DotNet.GenFacades (2)
src\Common\Internal\AssemblyResolver.cs (2)
43assemblyPath = args.RequestingAssembly?.Location; 55assemblyPath = Assembly.GetExecutingAssembly().Location;
Microsoft.DotNet.MacOsPkg.Tests (2)
UnpackPackTests.cs (2)
24Path.GetDirectoryName(typeof(UnpackPackTests).Assembly.Location)!, 236Path.GetDirectoryName(typeof(UnpackPackTests).Assembly.Location)!,
Microsoft.DotNet.RemoteExecutor (2)
RemoteExecutor.cs (2)
54Path = typeof(RemoteExecutor).Assembly.Location; 67string runtimePath = IOPath.GetDirectoryName(typeof(object).Assembly.Location);
Microsoft.DotNet.SignTool.Tests (5)
SignToolTests.cs (5)
273return Path.Combine(Path.GetDirectoryName(typeof(SignToolTests).Assembly.Location), "tools", "wix"); 276private static string s_snPath = Path.Combine(Path.GetDirectoryName(typeof(SignToolTests).Assembly.Location), "tools", "sn", "sn.exe"); 277private static string s_tarToolPath = Path.Combine(Path.GetDirectoryName(typeof(SignToolTests).Assembly.Location), "tools", "tar", "Microsoft.Dotnet.Tar.dll"); 278private static string s_pkgToolPath = Path.Combine(Path.GetDirectoryName(typeof(SignToolTests).Assembly.Location), "tools", "pkg", "Microsoft.Dotnet.MacOsPkg.dll"); 282var srcPath = Path.Combine(Path.GetDirectoryName(typeof(SignToolTests).Assembly.Location), "Resources", name);
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (1)
Languages\Language.cs (1)
19public static string BasePath { get; set; } = Path.GetDirectoryName(typeof(Templates).Assembly.Location);
Microsoft.DotNet.XUnitAssert.Tests (7)
EquivalenceAssertsTests.cs (7)
1531 var assemblyPath = Path.GetDirectoryName(typeof(SpecialCases).Assembly.Location); 1543 var assemblyPath = Path.GetDirectoryName(typeof(SpecialCases).Assembly.Location); 1561 var assembly = typeof(SpecialCases).Assembly.Location; 1571 var expected = new FileInfo(typeof(SpecialCases).Assembly.Location); 1572 var actual = new FileInfo(typeof(Assert).Assembly.Location); 1583 var location = typeof(SpecialCases).Assembly.Location; 1601 var location = typeof(SpecialCases).Assembly.Location;
Microsoft.Extensions.ApiDescription.Client.Tests (1)
TargetTest.cs (1)
19private static string _assemblyLocation = Path.GetDirectoryName(_assembly.Location);
Microsoft.Extensions.ApiDescription.Tool.Tests (2)
GetDocumentTests.cs (2)
17private readonly string _testAppAssembly = typeof(GetDocumentSample.Program).Assembly.Location; 20private readonly string _toolsDirectory = Path.GetDirectoryName(typeof(Program).Assembly.Location);
Microsoft.Extensions.DependencyModel (1)
DependencyContextLoader.cs (1)
130string assemblyLocation = assembly.Location;
Microsoft.Extensions.FileProviders.Embedded (2)
EmbeddedFileProvider.cs (1)
58var assemblyLocation = assembly.Location;
ManifestEmbeddedFileProvider.cs (1)
130var assemblyLocation = assembly.Location;
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (2)
NoRemoteCallHandler.cs (1)
23var assemblyFileLocation = Path.GetDirectoryName(typeof(NoRemoteCallHandler).Assembly.Location)!;
NoRemoteCallNotSeekableHandler.cs (1)
26var assemblyFileLocation = Path.GetDirectoryName(typeof(NoRemoteCallHandler).Assembly.Location)!;
Microsoft.Extensions.Http.Diagnostics.Tests (1)
Logging\Internal\NoRemoteCallHandler.cs (1)
19var assemblyFileLocation = Path.GetDirectoryName(typeof(NoRemoteCallHandler).Assembly.Location)!;
Microsoft.Gen.ComplianceReports.Unit.Tests (2)
test\Generators\Shared\RoslynTestUtils.cs (2)
58var corelib = Assembly.GetAssembly(typeof(object))!.Location; 73refs.Add(MetadataReference.CreateFromFile(r.Location));
Microsoft.Gen.ContextualOptions.Unit.Tests (2)
test\Generators\Shared\RoslynTestUtils.cs (2)
58var corelib = Assembly.GetAssembly(typeof(object))!.Location; 73refs.Add(MetadataReference.CreateFromFile(r.Location));
Microsoft.Gen.Logging.Unit.Tests (9)
CompilationHelper.cs (7)
25string corelib = Assembly.GetAssembly(typeof(object))!.Location; 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 (2)
58var corelib = Assembly.GetAssembly(typeof(object))!.Location; 73refs.Add(MetadataReference.CreateFromFile(r.Location));
Microsoft.Gen.MetadataExtractor.Unit.Tests (2)
test\Generators\Shared\RoslynTestUtils.cs (2)
58var corelib = Assembly.GetAssembly(typeof(object))!.Location; 73refs.Add(MetadataReference.CreateFromFile(r.Location));
Microsoft.Gen.Metrics.Unit.Tests (2)
test\Generators\Shared\RoslynTestUtils.cs (2)
58var corelib = Assembly.GetAssembly(typeof(object))!.Location; 73refs.Add(MetadataReference.CreateFromFile(r.Location));
Microsoft.Gen.MetricsReports.Unit.Tests (2)
test\Generators\Shared\RoslynTestUtils.cs (2)
58var corelib = Assembly.GetAssembly(typeof(object))!.Location; 73refs.Add(MetadataReference.CreateFromFile(r.Location));
Microsoft.ML.AutoML.Interactive (1)
AutoMLMonitorKernelExtension.cs (1)
41await cSharpKernel.SendAsync(new SubmitCode($@"#r ""{typeof(AutoMLMonitorKernelExtension).Assembly.Location}""
Microsoft.ML.AutoML.Tests (1)
DatasetUtil.cs (1)
237DatasetUtil).Assembly.Location).Directory.FullName, relativePath);
Microsoft.ML.CodeAnalyzer.Tests (1)
Helpers\AdditionalMetadataReferences.cs (1)
31var location = typeof(TType).Assembly.Location;
Microsoft.ML.Core (2)
Utilities\PathUtils.cs (2)
28string path = typeof(Utils).Assembly.Location; 90var assemblyDir = Path.GetDirectoryName(assemblyForBasePath.Assembly.Location);
Microsoft.ML.CpuMath.UnitTests (1)
UnitTests.cs (1)
997options.StartInfo.WorkingDirectory = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
Microsoft.ML.IntegrationTests (1)
IntegrationTestBaseClass.cs (1)
47var currentAssemblyLocation = new FileInfo(typeof(IntegrationTestBaseClass).Assembly.Location);
Microsoft.ML.OnnxConverter (1)
SaveOnnxCommand.cs (1)
326var versionInfo = System.Diagnostics.FileVersionInfo.GetVersionInfo(assembly.Location);
Microsoft.ML.PerformanceTests (4)
ImageClassificationBench.cs (1)
209ImageClassificationBench).Assembly.Location);
Numeric\Ranking.cs (1)
88_modelPathMslr = Path.Combine(Path.GetDirectoryName(typeof(RankingTest).Assembly.Location), "FastTreeRankingModel.zip");
Text\MultiClassClassification.cs (2)
105_modelPathWiki = Path.Combine(Path.GetDirectoryName(typeof(MulticlassClassificationTest).Assembly.Location), @"WikiModel.zip"); 123string modelpath = Path.Combine(Path.GetDirectoryName(typeof(MulticlassClassificationTest).Assembly.Location), @"WikiModel.fold000.zip");
Microsoft.ML.Samples (4)
Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (1)
310ImageClassificationDefault).Assembly.Location);
Dynamic\Trainers\MulticlassClassification\ImageClassification\LearningRateSchedulingCifarResnetTransferLearning.cs (1)
351LearningRateSchedulingCifarResnetTransferLearning).Assembly.Location);
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (1)
307ResnetV2101TransferLearningEarlyStopping).Assembly.Location);
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (1)
328ResnetV2101TransferLearningTrainTestSplit).Assembly.Location);
Microsoft.ML.Samples.GPU (4)
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (1)
310ImageClassificationDefault).Assembly.Location);
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\LearningRateSchedulingCifarResnetTransferLearning.cs (1)
351LearningRateSchedulingCifarResnetTransferLearning).Assembly.Location);
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (1)
307ResnetV2101TransferLearningEarlyStopping).Assembly.Location);
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (1)
328ResnetV2101TransferLearningTrainTestSplit).Assembly.Location);
Microsoft.ML.TestFramework (1)
CopyAction.cs (1)
45var testDirectory = new FileInfo(typeof(CopyAction).Assembly.Location).Directory;
Microsoft.NET.StringTools.UnitTests (1)
TestProgram.cs (1)
13newArgs.Insert(0, typeof(Program).Assembly.Location);
Microsoft.VisualBasic.Forms (1)
Microsoft\VisualBasic\ApplicationServices\AssemblyInfo.vb (1)
91Return IO.Path.GetDirectoryName(_assembly.Location)
Microsoft.VisualBasic.Tests (1)
Microsoft\VisualBasic\ApplicationServices\AssemblyInfoTests.cs (1)
24assemblyInfo.DirectoryPath.Should().Be(Path.GetDirectoryName(assembly.Location));
Microsoft.VisualStudio.LanguageServices (1)
ProjectSystem\VisualStudioWorkspaceImpl.cs (1)
234static m => m["Version"] = FileVersionInfo.GetVersionInfo(typeof(VisualStudioWorkspace).Assembly.Location).FileVersion));
Microsoft.VisualStudio.LanguageServices.Test.Utilities2 (2)
CodeModel\CodeModelTestHelpers.vb (2)
40SystemWindowsFormsPath = GetType(System.Windows.Forms.Form).Assembly.Location 41SystemDrawingPath = GetType(System.Drawing.Point).Assembly.Location
Microsoft.VisualStudio.LanguageServices.UnitTests (1)
ReferenceManager\VisualStudioMetadataReferenceManagerTests.vb (1)
19Dim assemblyDir = Path.GetDirectoryName(GetType(Object).Assembly.Location)
MSBuild (5)
BuildEnvironmentHelper.cs (1)
111msbuildExePath = typeof(BuildEnvironmentHelper).Assembly.Location;
CommunicationsUtilities.cs (1)
108Version fileVersion = new Version(FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion);
CoreCLRAssemblyLoader.cs (1)
122string[] searchPaths = [Assembly.GetExecutingAssembly().Location];
LoadedType.cs (1)
40Path = loadedAssembly.Location;
TypeLoader.cs (1)
54string msbuildDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
MSBuildTaskHost (5)
AssemblyUtilities.cs (1)
50return assembly.Location;
BuildEnvironmentHelper.cs (1)
111msbuildExePath = typeof(BuildEnvironmentHelper).Assembly.Location;
CommunicationsUtilities.cs (1)
108Version fileVersion = new Version(FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion);
LoadedType.cs (1)
40Path = loadedAssembly.Location;
TaskLoader.cs (1)
149loadedType.Type.GetTypeInfo().Assembly.Location);
PrepareTests (1)
TestDiscovery.cs (1)
61var dir = Path.GetDirectoryName(typeof(TestDiscovery).Assembly.Location);
PresentationBuildTasks (2)
MS\Internal\Tasks\IncrementalCompileAnalyzer.cs (1)
83if (IsFileChanged(Assembly.GetExecutingAssembly().Location) ||
MS\Internal\Tasks\TaskHelper.cs (1)
47string acPath = Assembly.GetExecutingAssembly().Location;
PresentationFramework (3)
MS\Internal\AppModel\ContentFilePart.cs (1)
103entryLocation = Application.ResourceAssembly.Location;
MS\Internal\WindowsRuntime\Generated\WinRT.cs (1)
100private static readonly string _currentModuleDirectory = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
System\Windows\Documents\Serialization\SerializerDescriptor.cs (1)
94sd._assemblyPath = factoryType.Assembly.Location;
Roslyn.Compilers.Extension (1)
CompilerPackage.cs (1)
37var packagePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
Roslyn.VisualStudio.Next.UnitTests (27)
Options\VisualStudioOptionStorageTests.cs (11)
22return OptionsTestInfo.CollectOptions(Path.GetDirectoryName(typeof(VisualStudioOptionStorage).Assembly.Location)) 31return OptionsTestInfo.CollectOptions(Path.GetDirectoryName(typeof(VisualStudioOptionStorage).Assembly.Location)) 41return OptionsTestInfo.CollectOptions(Path.GetDirectoryName(typeof(VisualStudioOptionStorage).Assembly.Location)) 51return OptionsTestInfo.CollectOptions(Path.GetDirectoryName(typeof(VisualStudioOptionStorage).Assembly.Location)) 74var infos = OptionsTestInfo.CollectOptions(Path.GetDirectoryName(typeof(VisualStudioOptionStorage).Assembly.Location)); 101var infos = OptionsTestInfo.CollectOptions(Path.GetDirectoryName(typeof(VisualStudioOptionStorage).Assembly.Location)); 149var infos = OptionsTestInfo.CollectOptions(Path.GetDirectoryName(typeof(VisualStudioOptionStorage).Assembly.Location)); 166var infos = OptionsTestInfo.CollectOptions(Path.GetDirectoryName(typeof(VisualStudioOptionStorage).Assembly.Location)); 178var infos = OptionsTestInfo.CollectOptions(Path.GetDirectoryName(typeof(VisualStudioOptionStorage).Assembly.Location)); 200var infos = OptionsTestInfo.CollectOptions(Path.GetDirectoryName(typeof(VisualStudioOptionStorage).Assembly.Location)); 280var allOptionGroups = OptionsTestInfo.CollectOptions(Path.GetDirectoryName(typeof(VisualStudioOptionStorage).Assembly.Location))
Remote\SnapshotSerializationTests.cs (7)
58.AddMetadataReference(MetadataReference.CreateFromFile(typeof(object).Assembly.Location)) 282var reference = MetadataReference.CreateFromFile(typeof(object).Assembly.Location); 423var location = typeof(object).Assembly.Location; 444var location = typeof(object).Assembly.Location; 562var mscorlibLocation = typeof(object).Assembly.Location; 696var original = typeof(AdhocWorkspace).Assembly.Location; 699shadow.CopyContentFrom(typeof(object).Assembly.Location);
Services\ServiceHubServicesTests.cs (3)
365file.CopyContentFrom(typeof(object).Assembly.Location); 1845.AddMetadataReference(MetadataReference.CreateFromFile(typeof(object).Assembly.Location)) 1846.AddAnalyzerReference(new AnalyzerFileReference(typeof(object).Assembly.Location, new TestAnalyzerAssemblyLoader()));
Services\SolutionServiceTests.cs (3)
83var filePath = typeof(SolutionServiceTests).Assembly.Location; 247var dir = Path.GetDirectoryName(typeof(SolutionServiceTests).Assembly.Location); 510.AddAnalyzerReference(new AnalyzerFileReference(typeof(Microsoft.CodeAnalysis.TestSourceGenerator.HelloWorldGenerator).Assembly.Location, new TestAnalyzerAssemblyLoader()))
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (3)
158var analyzerReference = new AnalyzerFileReference(analyzerType.Assembly.Location, new TestAnalyzerAssemblyLoader()); 197var analyzerReference = new AnalyzerFileReference(analyzerType.Assembly.Location, new TestAnalyzerAssemblyLoader()); 230var analyzerReference = new AnalyzerFileReference(analyzerType.Assembly.Location, new TestAnalyzerAssemblyLoader());
SignalR.Client.FunctionalTestApp (2)
src\SignalR\common\Shared\TestCertificates.cs (2)
35var certPath = Path.Combine(Path.GetDirectoryName(Assembly.GetCallingAssembly().Location), "TestCertificates", "testCert.pfx"); 41var certPath = Path.Combine(Path.GetDirectoryName(Assembly.GetCallingAssembly().Location), "TestCertificates", "testCertECC.pfx");
System.ComponentModel.TypeConverter (3)
System\ComponentModel\Design\DesigntimeLicenseContext.cs (2)
74string location = asm.Location; 95string location = resourceAssembly.Location;
System\ComponentModel\LicFileLicenseProvider.cs (1)
77if (type.Assembly.Location.Length != 0)
System.Configuration.ConfigurationManager (1)
System\Configuration\ClientConfigPaths.cs (1)
58if (exeAssembly?.Location.Length == 0)
System.Drawing.Common.Tests (1)
System\Drawing\Text\PrivateFontCollectionTests.cs (1)
131AssertExtensions.Throws<ArgumentException>(null, () => fontCollection.AddFontFile(typeof(Font).Assembly.Location));
System.IO.IsolatedStorage (1)
System\IO\IsolatedStorage\Helper.cs (1)
123location = assembly.Location;
System.Net.Quic (1)
System\Net\Quic\Internal\MsQuicApi.cs (1)
98string path = !ShouldUseAppLocalMsQuic() && typeof(MsQuicApi).Assembly.Location is string assemblyLocation && !string.IsNullOrEmpty(assemblyLocation)
System.Private.CoreLib (4)
src\libraries\System.Private.CoreLib\src\System\AppContext.AnyOS.cs (1)
24string? path = Assembly.GetEntryAssembly()?.Location;
src\libraries\System.Private.CoreLib\src\System\Reflection\Assembly.cs (1)
320string requestorPath = requestingAssembly.Location;
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (2)
630resolvedAssembly != null && !resolvedAssembly.IsDynamic ? resolvedAssembly.Location : null); 730asm != null && !asm.IsDynamic ? asm.Location : null);
System.Private.Xml (5)
System\Xml\Serialization\Compilation.cs (4)
234if (!string.IsNullOrEmpty(type.Assembly.Location)) 236path = Path.Combine(Path.GetDirectoryName(type.Assembly.Location)!, $"{assemblyName}.dll"); 239if ((string.IsNullOrEmpty(path) || !File.Exists(path)) && !string.IsNullOrEmpty(Assembly.GetEntryAssembly()?.Location)) 241path = Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly()!.Location)!, $"{assemblyName}.dll");
System\Xml\Serialization\XmlSerializer.cs (1)
693string? nameOrLocation = assembly.Location;
System.Reflection.Context (1)
System\Reflection\Context\Delegation\DelegatingAssembly.cs (1)
29get { return UnderlyingAssembly.Location; }
System.Reflection.MetadataLoadContext (1)
System\Reflection\TypeLoading\Assemblies\Ecma\EcmaAssembly.Modules.cs (1)
41string location = containingAssembly.Location;
System.Runtime.InteropServices (1)
System\Runtime\InteropServices\RuntimeEnvironment.cs (1)
21string? runtimeDirectory = typeof(object).Assembly.Location;
System.Runtime.Serialization.Schema (1)
System\Runtime\Serialization\Schema\CodeExporter.cs (1)
123string assemblyName = System.IO.Path.GetFileName(assembly.Location);
System.Windows.Forms (4)
System\Resources\AssemblyNamesTypeResolutionService.cs (1)
160if (result?.Assembly?.Location is { } location)
System\Windows\Forms\Application.cs (1)
1095s_appFileVersion = type is not null && type.Assembly.Location.Length > 0
System\Windows\Forms\Control.ControlVersionInfo.cs (1)
172private bool OwnerIsInMemoryAssembly => _owner.GetType().Assembly.Location.Length == 0;
System\Windows\Forms\Dialogs\ThreadExceptionDialog.cs (1)
183string location = assembly.Location;
System.Windows.Forms.Analyzers.Tests (1)
CurrentReferences.cs (1)
116string? testPath = Path.GetDirectoryName(typeof(CurrentReferences).Assembly.Location);
System.Windows.Forms.Design.Tests (3)
System\Resources\Tools\CodeDomCompileHelper.cs (2)
25string corelibPath = typeof(object).Assembly.Location; 30MetadataReference.CreateFromFile(typeof(Bitmap).Assembly.Location),
SystemDesignMetadataReader.cs (1)
24using FileStream fs = new(systemDesign.Location, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
System.Windows.Forms.IntegrationTests.Common (1)
TestHelpers.cs (1)
242Uri codeBaseUrl = new(Assembly.GetExecutingAssembly().Location);
System.Windows.Forms.Primitives.TestUtilities.Tests (1)
PathLengthTests.cs (1)
14string currentPath = typeof(PathLengthTests).Assembly.Location;
System.Windows.Forms.PrivateSourceGenerators.Tests (1)
EnumValidationTests.cs (1)
299references.Add(MetadataReference.CreateFromFile(assembly.Location));
System.Windows.Forms.UI.IntegrationTests (1)
Infra\DataCollectionService.cs (1)
269string assemblyPath = typeof(DataCollectionService).Assembly.Location;
TaskUsageLogger (1)
TaskUsageLogger.cs (1)
272evaluatedTaskAssemblyPath = a.Location;
Test.Utilities (7)
AdditionalMetadataReferences.cs (7)
90public static MetadataReference SystemCollectionsImmutableReference { get; } = MetadataReference.CreateFromFile(typeof(ImmutableHashSet<>).Assembly.Location); 91public static MetadataReference SystemComponentModelCompositionReference { get; } = MetadataReference.CreateFromFile(typeof(System.ComponentModel.Composition.ExportAttribute).Assembly.Location); 92public static MetadataReference SystemXmlDataReference { get; } = MetadataReference.CreateFromFile(typeof(System.Data.Rule).Assembly.Location); 93public static MetadataReference CodeAnalysisReference { get; } = MetadataReference.CreateFromFile(typeof(Compilation).Assembly.Location); 94public static MetadataReference CSharpSymbolsReference { get; } = MetadataReference.CreateFromFile(typeof(CSharpCompilation).Assembly.Location); 95public static MetadataReference WorkspacesReference { get; } = MetadataReference.CreateFromFile(typeof(Workspace).Assembly.Location); 100public static MetadataReference TestReferenceAssembly { get; } = MetadataReference.CreateFromFile(typeof(OtherDll.OtherDllStaticMethods).Assembly.Location);
VBCSCompiler (1)
src\Compilers\Server\VBCSCompiler\AnalyzerConsistencyChecker.cs (1)
131var loadedAssemblyLocation = loader.GetOriginalDependencyLocation(loadedAssembly.GetName()) ?? loadedAssembly.Location;
VBCSCompiler.UnitTests (5)
CompilerServerTests.cs (4)
200clientDir: Path.GetDirectoryName(typeof(CommonCompiler).Assembly.Location), 450var basePath = Path.GetDirectoryName(typeof(CompilerServerUnitTests).Assembly.Location); 1460var basePath = Path.GetDirectoryName(typeof(CompilerServerUnitTests).Assembly.Location); 1465dir.CopyFile(typeof(System.Collections.Immutable.ImmutableArray).Assembly.Location);
ServerUtil.cs (1)
159internal static string DefaultClientDirectory { get; } = Path.GetDirectoryName(typeof(BuildClientTests).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)
xunit.console (3)
common\AssemblyResolution\AssemblyHelper.cs (1)
104=> new AssemblyHelper(typeInAssembly.GetTypeInfo().Assembly.Location, internalDiagnosticsMessageSink);
common\AssemblyResolution\Microsoft.Extensions.DependencyModel\DependencyContextLoader.cs (1)
116var depsJsonFile = Path.ChangeExtension(assembly.Location, DepsJsonExtension);
ConsoleRunner.cs (1)
131var runnerPath = Path.GetDirectoryName(typeof(Program).GetTypeInfo().Assembly.Location);