1 instantiation of AppDomain
System.Private.CoreLib (1)
src\libraries\System.Private.CoreLib\src\System\AppDomain.cs (1)
39Interlocked.CompareExchange(ref s_domain, new AppDomain(), null);
264 references to AppDomain
AutobahnTestApp (1)
Program.cs (1)
78AppDomain.CurrentDomain.UnhandledException += (_, a) =>
csc (1)
src\Compilers\Shared\BuildClient.cs (1)
84AppDomain.CurrentDomain.BaseDirectory!;
DesignSurfaceExt (1)
TypeDiscoveryService.cs (1)
20: (ICollection)_discoveredTypesCache.GetOrAdd(baseType, type => FindTypes(type, AppDomain.CurrentDomain.GetAssemblies()));
dotnet-svcutil.xmlserializer (2)
Microsoft\Tools\ServiceModel\SvcUtil\Options.cs (2)
512AppDomain.CurrentDomain.TypeResolve += new ResolveEventHandler(typeResolver.ResolveType); 513AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(typeResolver.ResolveAssembly);
GetDocument.Insider (1)
Commands\GetDocumentCommandWorker.cs (1)
194foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
illink (12)
ILLink.RoslynAnalyzer (12)
src\tools\illink\src\ILLink.Shared\TrimAnalysis\IntrinsicId.cs (12)
260 /// <item><see cref="System.AppDomain.CreateInstance(string, string)"/></item> 261 /// <item><see cref="System.AppDomain.CreateInstance(string, string, bool, System.Reflection.BindingFlags, System.Reflection.Binder, object[], System.Globalization.CultureInfo, object[])"/></item> 262 /// <item><see cref="System.AppDomain.CreateInstance(string, string, object[])"/></item> 268 /// <item><see cref="System.AppDomain.CreateInstanceAndUnwrap(string, string)"/></item> 269 /// <item><see cref="System.AppDomain.CreateInstanceAndUnwrap(string, string, bool, System.Reflection.BindingFlags, System.Reflection.Binder, object[], System.Globalization.CultureInfo, object[])"/></item> 270 /// <item><see cref="System.AppDomain.CreateInstanceAndUnwrap(string, string, object[])"/></item> 276 /// <item><see cref="System.AppDomain.CreateInstanceFrom(string, string)"/></item> 277 /// <item><see cref="System.AppDomain.CreateInstanceFrom(string, string, bool, System.Reflection.BindingFlags, System.Reflection.Binder, object[], System.Globalization.CultureInfo, object[])"/></item> 278 /// <item><see cref="System.AppDomain.CreateInstanceFrom(string, string, object[])"/></item> 284 /// <item><see cref="System.AppDomain.CreateInstanceFromAndUnwrap(string, string)"/></item> 285 /// <item><see cref="System.AppDomain.CreateInstanceFromAndUnwrap(string, string, bool, System.Reflection.BindingFlags, System.Reflection.Binder, object[], System.Globalization.CultureInfo, object[])"/></item> 286 /// <item><see cref="System.AppDomain.CreateInstanceFromAndUnwrap(string, string, object[])"/></item>
InProcessWebSite (1)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Startup.cs (1)
983await ctx.Response.WriteAsync(AppDomain.CurrentDomain.BaseDirectory);
Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests (1)
TransformTest.cs (1)
14private static readonly string XdtExtensionPath = AppDomain.CurrentDomain.BaseDirectory;
Microsoft.AspNetCore.Components (1)
src\Components\Shared\src\RootTypeCache.cs (1)
28return _typeToKeyLookUp.GetOrAdd(key, ResolveType, AppDomain.CurrentDomain.GetAssemblies());
Microsoft.AspNetCore.Components.Server (2)
src\Components\Shared\src\ComponentParametersTypeCache.cs (1)
23return _typeToKeyLookUp.GetOrAdd(key, ResolveType, AppDomain.CurrentDomain.GetAssemblies());
src\Components\Shared\src\RootTypeCache.cs (1)
28return _typeToKeyLookUp.GetOrAdd(key, ResolveType, AppDomain.CurrentDomain.GetAssemblies());
Microsoft.AspNetCore.Components.WebAssembly (7)
HotReload\HotReloadAgent.cs (4)
40AppDomain.CurrentDomain.AssemblyLoad += OnAssemblyLoad; 58AppDomain.CurrentDomain.AssemblyLoad -= OnAssemblyLoad; 123foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies()) 145var assembly = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault(assembly => TryGetModuleId(assembly) is Guid moduleId && moduleId == delta.ModuleId);
HotReload\MetadataUpdateHandlerInvoker.cs (1)
90var sortedAssemblies = TopologicalSort(AppDomain.CurrentDomain.GetAssemblies());
src\Components\Shared\src\ComponentParametersTypeCache.cs (1)
23return _typeToKeyLookUp.GetOrAdd(key, ResolveType, AppDomain.CurrentDomain.GetAssemblies());
src\Components\Shared\src\RootTypeCache.cs (1)
28return _typeToKeyLookUp.GetOrAdd(key, ResolveType, AppDomain.CurrentDomain.GetAssemblies());
Microsoft.AspNetCore.Components.WebViewE2E.Test (1)
BasicBlazorHybridTest.cs (1)
61AppDomain.CurrentDomain.UnhandledException += (sender, error) =>
Microsoft.AspNetCore.Hosting (2)
Internal\WebHostLifetime.cs (2)
21AppDomain.CurrentDomain.ProcessExit += ProcessExit; 38AppDomain.CurrentDomain.ProcessExit -= ProcessExit;
Microsoft.AspNetCore.Http.Extensions.Tests (3)
ValidationsGenerator\ValidationsGeneratorTestBase.cs (3)
39var references = AppDomain.CurrentDomain.GetAssemblies() 84var targetAssembly = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault(assembly => assembly.GetName().Name == outputAssemblyName); 190var targetAssembly = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault(assembly => assembly.GetName().Name == targetAssemblyName);
Microsoft.AspNetCore.Mvc.Testing (1)
WebApplicationFactory.cs (1)
469return new[] { Assembly.Load(AppDomain.CurrentDomain.FriendlyName) };
Microsoft.AspNetCore.OpenApi.SourceGenerators.Tests (2)
SnapshotTestHelper.cs (2)
36var references = AppDomain.CurrentDomain.GetAssemblies() 190var targetAssembly = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault(assembly => assembly.GetName().Name == "Microsoft.AspNetCore.OpenApi");
Microsoft.AspNetCore.Server.HttpSys (1)
NativeInterop\SafeNativeOverlapped.cs (1)
15|| AppDomain.CurrentDomain.IsFinalizingForUnload();
Microsoft.AspNetCore.Server.IIS (1)
StartupHook.cs (1)
44AppDomain.CurrentDomain.UnhandledException += (sender, eventArgs) =>
Microsoft.Build (32)
BackEnd\BuildManager\BuildManager.cs (1)
2832, AppDomain.CurrentDomain.SetupInformation
BackEnd\Components\RequestBuilder\AssemblyLoadsTracker.cs (8)
27private readonly AppDomain _appDomain; 34AppDomain appDomain) 47AppDomain? appDomain = null) 54AppDomain? appDomain = null) 61AppDomain? appDomain = null) 67public static void StopTracking(AppDomain appDomain) 107AppDomain? appDomain) 124var tracker = new AssemblyLoadsTracker(loggingContext, loggingService, context, initiatorType, appDomain ?? AppDomain.CurrentDomain);
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupLoggingHelper.cs (1)
328if (AppDomain.CurrentDomain.IsDefaultAppDomain())
Evaluation\Evaluator.cs (1)
2536string configLocation = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile;
FileUtilities.cs (1)
144cacheDirectory = Path.Combine(TempFileDirectory, string.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", EnvironmentUtilities.CurrentProcessId, AppDomain.CurrentDomain.Id));
Instance\ProjectItemInstance.cs (1)
1059if (!AppDomain.CurrentDomain.IsDefaultAppDomain())
Instance\TaskFactories\AssemblyTaskFactory.cs (5)
49private Dictionary<ITask, AppDomain> _tasksAndAppDomains = new Dictionary<ITask, AppDomain>(); 207AppDomain appDomain; 223Task.Run(() => AppDomain.Unload(appDomain)); 378AppDomain taskAppDomain = null;
Instance\TaskRegistry.cs (1)
1552factory = (ITaskFactory)AppDomain.CurrentDomain.CreateInstanceAndUnwrap(loadedType.Type.GetTypeInfo().Assembly.FullName, loadedType.Type.FullName);
RegisteredTaskObjectCacheBase.cs (1)
38AppDomain.CurrentDomain.DomainUnload += new EventHandler((sender, args) =>
TaskEngineAssemblyResolver.cs (2)
58AppDomain.CurrentDomain.AssemblyResolve += _eventHandler; 76AppDomain.CurrentDomain.AssemblyResolve -= _eventHandler;
TaskLoader.cs (6)
52Action<AppDomain> appDomainCreated, 56, out AppDomain? taskAppDomain 107AppDomain.CurrentDomain.AssemblyResolve += AssemblyResolver; 110taskAppDomain = AppDomain.CreateDomain(isOutOfProc ? "taskAppDomain (out-of-proc)" : "taskAppDomain (in-proc)", null, appDomainInfo); 168AppDomain.Unload(taskAppDomain); 201AppDomain.CurrentDomain.AssemblyResolve -= AssemblyResolver;
TaskParameter.cs (1)
991if (!AppDomain.CurrentDomain.IsDefaultAppDomain())
Utilities\NuGetFrameworkWrapper.cs (3)
195AppDomainSetup appDomainSetup = AppDomain.CurrentDomain.SetupInformation; 228AppDomain appDomain = AppDomain.CreateDomain(nameof(NuGetFrameworkWrapper), null, appDomainSetup);
Microsoft.Build.Engine.OM.UnitTests (1)
FileUtilities.cs (1)
144cacheDirectory = Path.Combine(TempFileDirectory, string.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", EnvironmentUtilities.CurrentProcessId, AppDomain.CurrentDomain.Id));
Microsoft.Build.Engine.UnitTests (1)
BackEnd\BinaryTranslator_Tests.cs (1)
247=> AppDomain
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (3)
CscTests.cs (3)
729private static void LoadInAppDomain(string dirName, Action<AppDomain, string, string> action) 741var appDomain = Roslyn.Test.Utilities.Desktop.AppDomainUtils.Create("TestAppDomain", dirPath); 748AppDomain.Unload(appDomain);
Microsoft.Build.Tasks.Core (3)
FileUtilities.cs (1)
144cacheDirectory = Path.Combine(TempFileDirectory, string.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", EnvironmentUtilities.CurrentProcessId, AppDomain.CurrentDomain.Id));
RoslynCodeTaskFactory\RoslynCodeTaskFactory.cs (2)
127AppDomain.CurrentDomain.AssemblyResolve -= handlerAddedToAppDomain; 589AppDomain.CurrentDomain.AssemblyResolve += handlerAddedToAppDomain;
Microsoft.Build.Utilities.Core (1)
FileUtilities.cs (1)
144cacheDirectory = Path.Combine(TempFileDirectory, string.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", EnvironmentUtilities.CurrentProcessId, AppDomain.CurrentDomain.Id));
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (1)
CommandLineTests.cs (1)
67var netStandardDllPath = AppDomain.CurrentDomain.GetAssemblies()
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (16)
Diagnostics\DiagnosticAnalyzerTests.cs (6)
932AppDomain.CurrentDomain.FirstChanceException += firstChanceException; 942AppDomain.CurrentDomain.FirstChanceException -= firstChanceException; 968AppDomain.CurrentDomain.FirstChanceException += firstChanceException; 978AppDomain.CurrentDomain.FirstChanceException -= firstChanceException; 1082AppDomain.CurrentDomain.FirstChanceException += firstChanceException; 1093AppDomain.CurrentDomain.FirstChanceException -= firstChanceException;
Diagnostics\DiagnosticSuppressorTests.cs (10)
405AppDomain.CurrentDomain.FirstChanceException += firstChanceException; 418AppDomain.CurrentDomain.FirstChanceException -= firstChanceException; 447AppDomain.CurrentDomain.FirstChanceException += firstChanceException; 462AppDomain.CurrentDomain.FirstChanceException -= firstChanceException; 499AppDomain.CurrentDomain.FirstChanceException += firstChanceException; 517AppDomain.CurrentDomain.FirstChanceException -= firstChanceException; 552AppDomain.CurrentDomain.FirstChanceException += firstChanceException; 570AppDomain.CurrentDomain.FirstChanceException -= firstChanceException; 605AppDomain.CurrentDomain.FirstChanceException += firstChanceException; 623AppDomain.CurrentDomain.FirstChanceException -= firstChanceException;
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (2)
InteractiveSessionReferencesTests.cs (2)
476AppDomain.CurrentDomain.AssemblyResolve += handler; 489AppDomain.CurrentDomain.AssemblyResolve -= handler;
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (5)
Threading\StaTaskScheduler.cs (5)
17/// <summary>Gets a <see cref="StaTaskScheduler"/> for the current <see cref="AppDomain"/>.</summary> 30var getDefaultDomain = typeof(AppDomain).GetMethod("GetDefaultDomain", BindingFlags.NonPublic | BindingFlags.Static); 31var defaultDomain = (AppDomain)getDefaultDomain.Invoke(null, null); 54AppDomain.CurrentDomain.DomainUnload += (sender, e) =>
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (2)
ReflectionUtilities.cs (2)
63private readonly AppDomain _appDomain; 68_appDomain = AppDomain.CurrentDomain;
Microsoft.CodeAnalysis.InteractiveHost (3)
Interactive\Core\InteractiveHost.Service.cs (3)
148AppDomain.CurrentDomain.ProcessExit += HandleProcessExit; 154AppDomain.CurrentDomain.ProcessExit -= HandleProcessExit; 808AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler((_, __) =>
Microsoft.CodeAnalysis.LanguageServer.UnitTests (1)
ExportProviderBuilderTests.cs (1)
91var assemblies = AppDomain.CurrentDomain.GetAssemblies();
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Services\BrokeredServiceBase.cs (1)
197var loadDir = AppDomain.CurrentDomain.BaseDirectory!;
Microsoft.CodeAnalysis.UnitTests (1)
AnalyzerAssemblyLoaderTests.cs (1)
1430Assert.Single(AppDomain.CurrentDomain.GetAssemblies(), x => x.FullName == assembly.FullName);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
TestExportJoinableTaskContext.cs (1)
118foreach (var assembly in System.AppDomain.CurrentDomain.GetAssemblies())
Microsoft.CodeAnalysis.XunitHook (2)
XunitDisposeHook.cs (2)
18if (!AppDomain.CurrentDomain.IsDefaultAppDomain()) 21var xunitUtilities = AppDomain.CurrentDomain.GetAssemblies().Where(static assembly => assembly.GetName().Name.StartsWith("xunit.runner.utility")).ToArray();
Microsoft.Data.Analysis.Tests (1)
test\Microsoft.ML.TestFramework\BaseTestClass.cs (1)
31AppDomain.CurrentDomain.UnhandledException += (sender, e) =>
Microsoft.DotNet.Build.Tasks.TargetFramework (3)
src\Common\Internal\AssemblyResolver.cs (3)
20AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve; 35AssemblyName referenceName = new AssemblyName(AppDomain.CurrentDomain.ApplyPolicy(args.Name)); 68probingPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, fileName);
Microsoft.DotNet.GenFacades (3)
src\Common\Internal\AssemblyResolver.cs (3)
20AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve; 35AssemblyName referenceName = new AssemblyName(AppDomain.CurrentDomain.ApplyPolicy(args.Name)); 68probingPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, fileName);
Microsoft.Extensions.DependencyModel (3)
DependencyContextPaths.cs (2)
35object? deps = AppDomain.CurrentDomain.GetData(DepsFilesProperty); 36object? fxDeps = AppDomain.CurrentDomain.GetData(FxDepsFileProperty);
EnvironmentWrapper.cs (1)
17public object? GetAppContextData(string name) => AppDomain.CurrentDomain.GetData(name);
Microsoft.JSInterop (1)
Infrastructure\DotNetDispatcher.cs (1)
499foreach (Assembly a in AppDomain.CurrentDomain.GetAssemblies())
Microsoft.Maui (1)
HotReload\HotReloadHelper.cs (1)
164 var assemblies = AppDomain.CurrentDomain.GetAssemblies();
Microsoft.Maui.Controls (3)
DependencyService.cs (1)
119 Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
Registrar.cs (1)
433 AppDomain.CurrentDomain.GetAssemblies(),
Visuals\VisualTypeConverter.cs (1)
53 Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
Microsoft.Maui.Controls.Xaml (1)
XamlParser.cs (1)
338 Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
Microsoft.ML.Core (3)
ComponentModel\AssemblyLoadingUtils.cs (3)
97foreach (Assembly a in AppDomain.CurrentDomain.GetAssemblies()) 279AppDomain.CurrentDomain.AssemblyLoad += CurrentDomainAssemblyLoad; 284AppDomain.CurrentDomain.AssemblyLoad -= CurrentDomainAssemblyLoad;
Microsoft.ML.DnnImageFeaturizer.AlexNet (1)
AlexNetExtension.cs (1)
28return AlexNet(dnnModelContext, env, outputColumnName, inputColumnName, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "DnnImageModels"));
Microsoft.ML.DnnImageFeaturizer.ResNet101 (1)
ResNet101Extension.cs (1)
28return ResNet101(dnnModelContext, env, outputColumnName, inputColumnName, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "DnnImageModels"));
Microsoft.ML.DnnImageFeaturizer.ResNet18 (1)
ResNet18Extension.cs (1)
28return ResNet18(dnnModelContext, env, outputColumnName, inputColumnName, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "DnnImageModels"));
Microsoft.ML.DnnImageFeaturizer.ResNet50 (1)
ResNet50Extension.cs (1)
28return ResNet50(dnnModelContext, env, outputColumnName, inputColumnName, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "DnnImageModels"));
Microsoft.ML.TestFramework (1)
BaseTestClass.cs (1)
31AppDomain.CurrentDomain.UnhandledException += (sender, e) =>
MSBuild (2)
FileUtilities.cs (1)
144cacheDirectory = Path.Combine(TempFileDirectory, string.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", EnvironmentUtilities.CurrentProcessId, AppDomain.CurrentDomain.Id));
XMake.cs (1)
672AppDomain.CurrentDomain.UnhandledException += ExceptionHandling.UnhandledExceptionHandler;
MSBuildTaskHost (12)
FileUtilities.cs (1)
144cacheDirectory = Path.Combine(TempFileDirectory, string.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", EnvironmentUtilities.CurrentProcessId, AppDomain.CurrentDomain.Id));
OutOfProcTaskAppDomainWrapperBase.cs (2)
43private AppDomain _taskAppDomain; 170AppDomain.Unload(_taskAppDomain);
TaskEngineAssemblyResolver.cs (2)
58AppDomain.CurrentDomain.AssemblyResolve += _eventHandler; 76AppDomain.CurrentDomain.AssemblyResolve -= _eventHandler;
TaskLoader.cs (6)
52Action<AppDomain> appDomainCreated, 56, out AppDomain? taskAppDomain 107AppDomain.CurrentDomain.AssemblyResolve += AssemblyResolver; 110taskAppDomain = AppDomain.CreateDomain(isOutOfProc ? "taskAppDomain (out-of-proc)" : "taskAppDomain (in-proc)", null, appDomainInfo); 168AppDomain.Unload(taskAppDomain); 201AppDomain.CurrentDomain.AssemblyResolve -= AssemblyResolver;
TaskParameter.cs (1)
991if (!AppDomain.CurrentDomain.IsDefaultAppDomain())
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
41[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.AppDomain))]
netstandard (1)
netstandard.cs (1)
37[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.AppDomain))]
PhotinoTestApp (1)
Program.cs (1)
26AppDomain.CurrentDomain.UnhandledException += (sender, error) =>
PresentationBuildTasks (4)
Microsoft\Build\Tasks\Windows\MarkupCompilePass1.cs (2)
1207AppDomain appDomain = null; 1273AppDomain.Unload(appDomain);
Microsoft\Build\Tasks\Windows\MarkupCompilePass2.cs (2)
624AppDomain appDomain = null; 694AppDomain.Unload(appDomain);
PresentationCore (9)
ModuleInitializer.cs (1)
27AppDomain.CurrentDomain.ProcessExit += static (object sender, EventArgs e) =>
MS\Internal\AppModel\SiteOfOriginContainer.cs (1)
42Uri siteOfOrigin = BaseUriHelper.FixFileUri(new Uri(System.AppDomain.CurrentDomain.BaseDirectory));
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\AppDomainShutdownMonitor.cs (2)
28AppDomain.CurrentDomain.DomainUnload += OnShutdown; 29AppDomain.CurrentDomain.ProcessExit += OnShutdown;
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SafeSecurityHelper.cs (1)
102Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SecurityHelper.cs (1)
68internal static Uri GetBaseDirectory(AppDomain domain)
System\Windows\Media\MediaPlayerState.cs (3)
85AppDomain.CurrentDomain.ProcessExit -= _helper.ProcessExitHandler; 799AppDomain.CurrentDomain.ProcessExit += _helper.ProcessExitHandler; 826Uri appBase = SecurityHelper.GetBaseDirectory(AppDomain.CurrentDomain);
PresentationFramework (4)
MS\Internal\AppModel\ResourceContainer.cs (1)
152AppDomain.CurrentDomain.AssemblyLoad += new AssemblyLoadEventHandler(OnAssemblyLoadEventHandler);
System\Windows\Documents\WinRTSpellerInterop.cs (2)
80WeakEventManager<AppDomain, UnhandledExceptionEventArgs> 81.AddHandler(AppDomain.CurrentDomain, "UnhandledException", ProcessUnhandledException);
System\Windows\Markup\XmlnsCache.cs (1)
182Assembly[] asmList = AppDomain.CurrentDomain.GetAssemblies();
Replay (1)
Replay.cs (1)
66clientDirectory: AppDomain.CurrentDomain.BaseDirectory!,
Roslyn.Test.Performance.Utilities (2)
Benchview.cs (1)
19AppDomain.CurrentDomain.BaseDirectory, "..", "..", "tools", "Microsoft.BenchView.JSONFormat", "tools");
TestUtilities.cs (1)
124workingDirectory ??= AppDomain.CurrentDomain.BaseDirectory;
Roslyn.VisualStudio.DiagnosticsWindow (1)
Panels\TelemetryPanel.xaml.cs (1)
62foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
System.ComponentModel.Composition (12)
System\ComponentModel\Composition\Hosting\ApplicationCatalog.cs (4)
74var location = AppDomain.CurrentDomain.BaseDirectory; 84string? relativeSearchPath = AppDomain.CurrentDomain.RelativeSearchPath; 174$"{GetType().Name} (Path=\"{AppDomain.CurrentDomain.BaseDirectory}\") (PrivateProbingPath=\"{AppDomain.CurrentDomain.RelativeSearchPath}\")"; // NOLOC
System\ComponentModel\Composition\Hosting\DirectoryCatalog.cs (8)
52/// The path needs to be absolute or relative to <see cref="AppDomain.BaseDirectory"/> 86/// The path needs to be absolute or relative to <see cref="AppDomain.BaseDirectory"/> 125/// The path needs to be absolute or relative to <see cref="AppDomain.BaseDirectory"/> 163/// The path needs to be absolute or relative to <see cref="AppDomain.BaseDirectory"/> 206/// The path needs to be absolute or relative to <see cref="AppDomain.BaseDirectory"/> 248/// The path needs to be absolute or relative to <see cref="AppDomain.BaseDirectory"/> 293/// The path needs to be absolute or relative to <see cref="AppDomain.BaseDirectory"/> 343/// The path needs to be absolute or relative to <see cref="AppDomain.BaseDirectory"/>
System.ComponentModel.TypeConverter (2)
System\ComponentModel\Design\DesigntimeLicenseContext.cs (1)
71foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies())
System\ComponentModel\ReflectionCachesUpdateHandler.cs (1)
31foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
System.Configuration.ConfigurationManager (6)
System\Configuration\ClientConfigPaths.cs (5)
67ApplicationUri = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, exeAssembly.ManifestModule.Name); 87string externalConfigPath = AppDomain.CurrentDomain.GetData("APP_CONFIG_FILE") as string; 102externalConfigPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, externalConfigPath); 139string namePrefix = Validate(AppDomain.CurrentDomain.FriendlyName, limitSize: true); 263else if (Uri.TryCreate(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, assembly.ManifestModule.Name), UriKind.Absolute, out Uri codeBase))
System\Configuration\ClientConfigurationHost.cs (1)
48string directory = AppDomain.CurrentDomain.BaseDirectory;
System.Console (1)
System\ConsolePal.Unix.cs (1)
890AppDomain.CurrentDomain.UnhandledException += (_, _) => { Interop.Sys.UninitializeTerminal(); };
System.Data.Common (1)
System\Data\TypeLimiter.cs (1)
245Type[]? appDomainAllowedTypes = (Type[]?)AppDomain.CurrentDomain.GetData(AppDomainDataSetDefaultAllowedTypesKey);
System.Data.Odbc (2)
Common\System\Data\Common\DbConnectionOptions.cs (2)
272object? rootFolderObject = AppDomain.CurrentDomain.GetData("DataDirectory"); 280rootFolderPath = AppDomain.CurrentDomain.BaseDirectory;
System.Diagnostics.DiagnosticSource (2)
System\Diagnostics\Metrics\RuntimeMetrics.cs (2)
124() => (long)AppDomain.CurrentDomain.GetAssemblies().Length, 133AppDomain.CurrentDomain.FirstChanceException += (source, e) =>
System.Private.CoreLib (16)
src\libraries\System.Private.CoreLib\src\System\AppContext.cs (1)
113AppDomain.OnProcessExit();
src\libraries\System.Private.CoreLib\src\System\AppDomain.cs (5)
22private static AppDomain? s_domain; 31public static AppDomain CurrentDomain 92AppDomain? domain = s_domain; 108public static AppDomain CreateDomain(string friendlyName) 176public static void Unload(AppDomain domain)
src\libraries\System.Private.CoreLib\src\System\Runtime\ExceptionServices\ExceptionHandling.cs (2)
43/// Raises the <see cref="AppDomain.UnhandledException"/> event. 47/// This method will raise the <see cref="AppDomain.UnhandledException"/>
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (3)
685AssemblyLoad?.Invoke(AppDomain.CurrentDomain, new AssemblyLoadEventArgs(assembly)); 708AssemblyLoad?.Invoke(AppDomain.CurrentDomain, new AssemblyLoadEventArgs(assembly)); 722Assembly? asm = handler(AppDomain.CurrentDomain, args);
src\libraries\System.Private.CoreLib\src\System\Runtime\Versioning\VersioningHelper.cs (1)
66safeName.Append(AppDomain.CurrentDomain.Id);
src\libraries\System.Private.CoreLib\src\System\Threading\Thread.cs (3)
350CurrentPrincipal = (principal = AppDomain.CurrentDomain.GetThreadPrincipal()); 554public static AppDomain GetDomain() => AppDomain.CurrentDomain;
src\System\Reflection\Metadata\RuntimeTypeMetadataUpdateHandler.cs (1)
27foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
30[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.AppDomain))]
System.Runtime.Extensions (1)
System.Runtime.Extensions.cs (1)
4[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.AppDomain))]
System.Runtime.InteropServices (1)
System\Runtime\InteropServices\RuntimeEnvironment.cs (1)
24runtimeDirectory = AppDomain.CurrentDomain.BaseDirectory;
System.Web.Services.Description (2)
System\Web\Services\Diagnostics\TraceUtility.cs (2)
72AppDomain currentDomain = AppDomain.CurrentDomain;
System.Windows.Forms (6)
System\Windows\Forms\Application.cs (1)
321string s_systemTrackerWindow = $".NET-BroadcastEventWindow.{AppDomain.CurrentDomain.GetHashCode():x}.0";
System\Windows\Forms\Control.cs (1)
3492|| AppDomain.CurrentDomain.IsFinalizingForUnload())
System\Windows\Forms\Dialogs\ThreadExceptionDialog.cs (1)
179foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
System\Windows\Forms\NativeWindow.cs (2)
62AppDomain.CurrentDomain.ProcessExit += OnShutdown; 115if (!AppDomain.CurrentDomain.IsFinalizingForUnload() && (NTSTATUS)exitCode == NTSTATUS.STATUS_PENDING)
System\Windows\Forms\NativeWindow.WindowClass.cs (1)
31private static readonly string s_currentAppDomainHash = Convert.ToString(AppDomain.CurrentDomain.GetHashCode(), 16);
System.Windows.Forms.Design (1)
System\Drawing\BitmapSelector.cs (1)
24/// once per <see cref="AppDomain"/>.
System.Windows.Forms.Design.Tests (1)
SystemDesignMetadataReader.cs (1)
22Assembly systemDesign = AppDomain.CurrentDomain.GetAssemblies().First(a => a.GetName().Name == "System.Design");
System.Windows.Forms.PrivateSourceGenerators.Tests (1)
EnumValidationTests.cs (1)
294Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
System.Windows.Forms.Tests (2)
System\Windows\Forms\RichTextBoxTests.cs (2)
10681string projectDirectory = Path.Join(AppDomain.CurrentDomain.BaseDirectory, "..", "..", "..", "..", ".."); 10711string projectDirectory = Path.Join(AppDomain.CurrentDomain.BaseDirectory, "..", "..", "..", "..", "..");
System.Windows.Forms.UI.IntegrationTests (1)
Infra\DataCollectionService.cs (1)
102AppDomain.CurrentDomain.FirstChanceException += OnFirstChanceException;
System.Xaml (4)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SafeSecurityHelper.cs (1)
102Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
System\Xaml\XamlSchemaContext.cs (3)
1065Assembly[] currentAssemblies = AppDomain.CurrentDomain.GetAssemblies(); 1400AppDomain.CurrentDomain.AssemblyLoad += OnAssemblyLoad; 1405AppDomain.CurrentDomain.AssemblyLoad -= OnAssemblyLoad;
Templates.Blazor.WebAssembly.Auth.Tests (1)
src\Shared\E2ETesting\SauceConnectServer.cs (1)
133AppDomain.CurrentDomain.ProcessExit += (sender, args) => ProcessCleanup(process, pidFilePath);
Templates.Blazor.WebAssembly.Tests (1)
src\Shared\E2ETesting\SauceConnectServer.cs (1)
133AppDomain.CurrentDomain.ProcessExit += (sender, args) => ProcessCleanup(process, pidFilePath);
Templates.Mvc.Tests (1)
src\Shared\E2ETesting\SauceConnectServer.cs (1)
133AppDomain.CurrentDomain.ProcessExit += (sender, args) => ProcessCleanup(process, pidFilePath);
Templates.Tests (1)
src\Shared\E2ETesting\SauceConnectServer.cs (1)
133AppDomain.CurrentDomain.ProcessExit += (sender, args) => ProcessCleanup(process, pidFilePath);
vbc (1)
src\Compilers\Shared\BuildClient.cs (1)
84AppDomain.CurrentDomain.BaseDirectory!;
VBCSCompiler (3)
src\Compilers\Server\VBCSCompiler\AnalyzerConsistencyChecker.cs (2)
25/// 1. <see cref="AppDomain"/> pollution: On .NET Framework all analyzers are loaded into the same 26/// <see cref="AppDomain"/> instance. When analyzers have dependencies at different versions
src\Compilers\Shared\BuildClient.cs (1)
84AppDomain.CurrentDomain.BaseDirectory!;
xunit.assert (1)
Sdk\AssertHelper.cs (1)
105 return AppDomain.CurrentDomain.GetAssemblies();
xunit.console (1)
ConsoleRunner.cs (1)
135runnerPath = AppDomain.CurrentDomain.BaseDirectory;