--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System;
+using System.Reflection;
+
+namespace System
+{
+ public static class AssemblyPathHelper
+ {
+ public static string GetAssemblyLocation(Assembly a)
+ {
+ // Note, in Browser, assemblies are loaded from memory and in that case, Assembly.Location will return an empty
+ // string. For these tests, the assemblies will also be available in the VFS, so just specify the assembly name
+ // plus extension.
+ return (PlatformDetection.IsNotBrowser) ?
+ a.Location
+ : "/" + a.GetName().Name + ".dll";
+ }
+ }
+}
\ No newline at end of file
<Compile Include="System\IO\FileCleanupTestBase.cs" />
<Compile Include="System\TestEnvironment.cs" />
<Compile Include="System\ThreadCultureChange.cs" />
+ <Compile Include="System\AssemblyPathHelper.cs" />
<!-- We don't compile per but and instead use runtime platform checks. -->
<Compile Include="System\PlatformDetection.cs" />
<Compile Include="System\PlatformDetection.Unix.cs" />
[Fact]
public void CompiledAssembly_GetWithPathToAssemblySet_ReturnsExpectedAssembly()
{
- var results = new CompilerResults(null) { PathToAssembly = (PlatformDetection.IsBrowser ? "/" : string.Empty) + typeof(CompilerResultsTests).Assembly.Location };
+ var results = new CompilerResults(null) { PathToAssembly = AssemblyPathHelper.GetAssemblyLocation(typeof(CompilerResultsTests).Assembly) };
Assert.NotNull(results.CompiledAssembly);
Assert.Equal(typeof(CompilerResultsTests).Assembly.FullName, results.CompiledAssembly.FullName);
AssemblyName assemblyName = assembly.GetName();
Uri codeBase = new Uri(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, assembly.ManifestModule.Name));
- hash = IdentityHelper.GetNormalizedStrongNameHash(assemblyName);
+ try
+ {
+ // Certain platforms may not have support for crypto
+ hash = IdentityHelper.GetNormalizedStrongNameHash(assemblyName);
+ }
+ catch (PlatformNotSupportedException) { }
+
if (hash != null)
{
typeName = StrongNameDesc;
}
else
{
- hash = IdentityHelper.GetNormalizedUriHash(codeBase);
- typeName = UrlDesc;
+ try
+ {
+ // Certain platforms may not have support for crypto
+ hash = IdentityHelper.GetNormalizedUriHash(codeBase);
+ typeName = UrlDesc;
+ }
+ catch (PlatformNotSupportedException) { }
}
}
else if (!string.IsNullOrEmpty(exePath))
{
- // Fall back on the exe name
- hash = IdentityHelper.GetStrongHashSuitableForObjectName(exePath);
- typeName = PathDesc;
+ try
+ {
+ // Fall back on the exe name
+ // Certain platforms may not have support for crypto
+ hash = IdentityHelper.GetStrongHashSuitableForObjectName(exePath);
+ typeName = PathDesc;
+ }
+ catch (PlatformNotSupportedException) { }
}
if (!string.IsNullOrEmpty(hash)) suffix = "_" + typeName + "_" + hash;
namespace System.Diagnostics.SymbolStore.Tests
{
- [ActiveIssue("https://github.com/dotnet/runtime/issues/39650", TestPlatforms.Browser)]
public class StackTraceSymbolsTests
{
[Fact]
public void StackTraceSymbolsDoNotLockFile()
{
- var asmPath = typeof(StackTraceSymbolsTests).Assembly.Location;
+ var asmPath = AssemblyPathHelper.GetAssemblyLocation(typeof(StackTraceSymbolsTests).Assembly);
var pdbPath = Path.ChangeExtension(asmPath, ".pdb");
Assert.True(File.Exists(pdbPath));
<Compile Include="SymLanguageVendorTests.cs" />
<Compile Include="SymbolTokenTests.cs" />
</ItemGroup>
+ <ItemGroup Condition="'$(TargetOS)' == 'Browser'">
+ <WasmFilesToIncludeFromPublishDir Include="$(AssemblyName).dll" />
+ <WasmFilesToIncludeFromPublishDir Include="$(AssemblyName).pdb" />
+ </ItemGroup>
</Project>
\ No newline at end of file
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Type assembly name is different on .NET Framework.")]
public void TestCustomAttributeDecoder()
{
- using (FileStream stream = File.OpenRead(typeof(HasAttributes).GetTypeInfo().Assembly.Location))
+ using (FileStream stream = File.OpenRead(AssemblyPathHelper.GetAssemblyLocation(typeof(HasAttributes).GetTypeInfo().Assembly)))
using (var peReader = new PEReader(stream))
{
MetadataReader reader = peReader.GetMetadataReader();
[Fact]
public void DecodeVarArgsDefAndRef()
{
- using (FileStream stream = File.OpenRead(typeof(VarArgsToDecode).GetTypeInfo().Assembly.Location))
+ using (FileStream stream = File.OpenRead(AssemblyPathHelper.GetAssemblyLocation(typeof(VarArgsToDecode).GetTypeInfo().Assembly)))
using (var peReader = new PEReader(stream))
{
MetadataReader metadataReader = peReader.GetMetadataReader();
[Fact]
public void SimpleSignatureProviderCoverage()
{
- using (FileStream stream = File.OpenRead(typeof(SignaturesToDecode<>).GetTypeInfo().Assembly.Location))
+ using (FileStream stream = File.OpenRead(AssemblyPathHelper.GetAssemblyLocation(typeof(SignaturesToDecode<>).GetTypeInfo().Assembly)))
using (var peReader = new PEReader(stream))
{
MetadataReader reader = peReader.GetMetadataReader();
[Fact]
public void PinnedAndUnpinnedLocals()
{
- using (FileStream stream = File.OpenRead(typeof(PinnedAndUnpinnedLocalsToDecode).GetTypeInfo().Assembly.Location))
+ using (FileStream stream = File.OpenRead(AssemblyPathHelper.GetAssemblyLocation(typeof(PinnedAndUnpinnedLocalsToDecode).GetTypeInfo().Assembly)))
using (var peReader = new PEReader(stream))
{
MetadataReader reader = peReader.GetMetadataReader();
[Fact]
public void WrongSignatureType()
{
- using (FileStream stream = File.OpenRead(typeof(VarArgsToDecode).GetTypeInfo().Assembly.Location))
+ using (FileStream stream = File.OpenRead(AssemblyPathHelper.GetAssemblyLocation(typeof(VarArgsToDecode).GetTypeInfo().Assembly)))
using (var peReader = new PEReader(stream))
{
MetadataReader reader = peReader.GetMetadataReader();
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+using System;
namespace System.Reflection.Tests
{
name.Equals("System.Runtime.InteropServices", StringComparison.OrdinalIgnoreCase))
{
if (_coreAssembly == null)
+ {
_coreAssembly = context.LoadFromStream(TestUtils.CreateStreamForCoreAssembly());
+ }
return _coreAssembly;
}
Assembly assembly = type.Assembly;
string location = assembly.Location;
- if (location == null || location == string.Empty)
+ if (PlatformDetection.IsNotBrowser && (location == null || location == string.Empty))
{
throw new Exception("Could not find the IL for assembly " + type.Assembly + " on disk. The most likely cause " +
"is that you built the tests for a Jitted runtime but are running them on an AoT runtime.");
// The core assembly we're using might not be the one powering the runtime. Make sure we project to the core assembly the MetataLoadContext
// is using.
if (a == typeof(object).Assembly)
- return TestMetadataLoadContext.LoadFromStream(CreateStreamForCoreAssembly());
+ {
+ TestMetadataLoadContext.LoadFromStream(CreateStreamForCoreAssembly());
+ }
- return TestMetadataLoadContext.LoadFromAssemblyPath(a.Location);
+ return TestMetadataLoadContext.LoadFromAssemblyPath(AssemblyPathHelper.GetAssemblyLocation(a));
});
Type projectedType = s_typeDict.GetOrAdd(type, (t) => projectedAssembly.GetType(t.FullName, throwOnError: true, ignoreCase: false));
{
// We need a core assembly in IL form. Since this version of this code is for Jitted platforms, the System.Private.Corelib
// of the underlying runtime will do just fine.
- string assumedLocationOfCoreLibrary = typeof(object).Assembly.Location;
- if (assumedLocationOfCoreLibrary == null || assumedLocationOfCoreLibrary == string.Empty)
+ if (PlatformDetection.IsNotBrowser)
{
- throw new Exception("Could not find a core assembly to use for tests as 'typeof(object).Assembly.Location` returned " +
- "a null or empty value. The most likely cause is that you built the tests for a Jitted runtime but are running them " +
- "on an AoT runtime.");
+ string assumedLocationOfCoreLibrary = typeof(object).Assembly.Location;
+ if (assumedLocationOfCoreLibrary == null || assumedLocationOfCoreLibrary == string.Empty)
+ {
+ throw new Exception("Could not find a core assembly to use for tests as 'typeof(object).Assembly.Location` returned " +
+ "a null or empty value. The most likely cause is that you built the tests for a Jitted runtime but are running them " +
+ "on an AoT runtime.");
+ }
}
return File.OpenRead(GetPathToCoreAssembly());
public static string GetPathToCoreAssembly()
{
- return typeof(object).Assembly.Location;
+ return AssemblyPathHelper.GetAssemblyLocation(typeof(object).Assembly);
}
public static string GetNameOfCoreAssembly()
private static readonly Lazy<bool> s_useRuntimeTypesForTests = new Lazy<bool>(() =>
{
- if (File.Exists(Path.Combine(Path.GetDirectoryName(typeof(TestUtils).Assembly.Location), "UseRuntimeTypes.txt")))
+ if (PlatformDetection.IsBrowser)
+ return false;
+
+ var loc = AssemblyPathHelper.GetAssemblyLocation(typeof(TestUtils).Assembly);
+
+ if (File.Exists(Path.Combine(loc, "UseRuntimeTypes.txt")))
{
// Disable projection so that are Reflection tests run against the runtime types. This is used primarily to verify
// the *test* code for correctness.
string coreAssemblyPath = TestUtils.GetPathToCoreAssembly();
// Obtain this test class
- string thisAssemblyPath = typeof(MetadataLoadContextTests).Assembly.Location;
-
- if (PlatformDetection.IsBrowser)
- {
- // prepends slash as Assembly.Location only contains the file name on browser (https://github.com/dotnet/runtime/issues/39650)
- thisAssemblyPath = "/" + thisAssemblyPath;
- }
-
+ string thisAssemblyPath = AssemblyPathHelper.GetAssemblyLocation(typeof(MetadataLoadContextTests).Assembly);
var resolver = new PathAssemblyResolver(new string[] { coreAssemblyPath, thisAssemblyPath });
using (MetadataLoadContext lc = new MetadataLoadContext(resolver, TestUtils.GetNameOfCoreAssembly()))
{
// Ensure you can do all this without resolving dependencies.
using (MetadataLoadContext lc = new MetadataLoadContext(new EmptyCoreMetadataAssemblyResolver()))
{
- Assembly a = lc.LoadFromAssemblyPath(typeof(GenericClass1<>).Assembly.Location);
+ Assembly a = lc.LoadFromAssemblyPath(AssemblyPathHelper.GetAssemblyLocation(typeof(GenericClass1<>).Assembly));
AssemblyName assemblyName = a.GetName();
Console.WriteLine(assemblyName.FullName);
}
// Ensure you can do all this without resolving dependencies.
using (MetadataLoadContext lc = new MetadataLoadContext(new EmptyCoreMetadataAssemblyResolver()))
{
- Assembly a = lc.LoadFromAssemblyPath(typeof(GenericClass1<>).Assembly.Location);
+ Assembly a = lc.LoadFromAssemblyPath(AssemblyPathHelper.GetAssemblyLocation(typeof(GenericClass1<>).Assembly));
foreach (AssemblyName name in a.GetReferencedAssemblies())
{
Console.WriteLine(name.FullName);
{
Assembly[] candidates =
{
- lc.LoadFromAssemblyPath(typeof(GenericClass1<>).Assembly.Location),
- lc.LoadFromAssemblyPath(typeof(object).Assembly.Location),
+ lc.LoadFromAssemblyPath(AssemblyPathHelper.GetAssemblyLocation(typeof(GenericClass1<>).Assembly)),
+ lc.LoadFromAssemblyPath(AssemblyPathHelper.GetAssemblyLocation(typeof(object).Assembly)),
};
foreach (Assembly candidate in candidates)
// Ensure you can do all this without resolving dependencies.
using (MetadataLoadContext lc = new MetadataLoadContext(new EmptyCoreMetadataAssemblyResolver()))
{
- Assembly a = lc.LoadFromAssemblyPath(typeof(GenericClass1<>).Assembly.Location);
+ Assembly a = lc.LoadFromAssemblyPath(AssemblyPathHelper.GetAssemblyLocation(typeof(GenericClass1<>).Assembly));
foreach (TypeInfo t in a.DefinedTypes)
{
Console.WriteLine(t.FullName);
{
using (MetadataLoadContext lc = new MetadataLoadContext(new EmptyCoreMetadataAssemblyResolver()))
{
- Assembly a = lc.LoadFromAssemblyPath(typeof(TopLevelType).Assembly.Location);
+ Assembly a = lc.LoadFromAssemblyPath(AssemblyPathHelper.GetAssemblyLocation(typeof(TopLevelType).Assembly));
#pragma warning disable SYSLIB0012
Assert.Throws<NotSupportedException>(() => a.CodeBase);
{
using (MetadataLoadContext lc = new MetadataLoadContext(new EmptyCoreMetadataAssemblyResolver()))
{
- Assembly a = lc.LoadFromAssemblyPath(typeof(SampleMetadata.NS0.SameNamedType).Assembly.Location);
+ Assembly a = lc.LoadFromAssemblyPath(AssemblyPathHelper.GetAssemblyLocation(typeof(SampleMetadata.NS0.SameNamedType).Assembly));
// Create big hash collisions in GetTypeCoreCache.
for (int i = 0; i < 16; i++)
{
using (MetadataLoadContext lc = new MetadataLoadContext(new EmptyCoreMetadataAssemblyResolver()))
{
// Make sure the tricky corner case of a null/empty namespace is covered.
- Assembly a = lc.LoadFromAssemblyPath(typeof(TopLevelType).Assembly.Location);
+ Assembly a = lc.LoadFromAssemblyPath(AssemblyPathHelper.GetAssemblyLocation(typeof(TopLevelType).Assembly));
Type t = a.GetType("TopLevelType", throwOnError: true, ignoreCase: false);
Assert.Null(t.Namespace);
Assert.Equal("TopLevelType", t.Name);
}
Assembly a = typeof(AssemblyNameTests).Assembly;
- Assert.Equal(new AssemblyName(a.FullName).ToString(), AssemblyName.GetAssemblyName(a.Location).ToString());
+ Assert.Equal(new AssemblyName(a.FullName).ToString(), AssemblyName.GetAssemblyName(AssemblyPathHelper.GetAssemblyLocation(a)).ToString());
}
[Fact]
AssertExtensions.Throws<ArgumentException>(null, () => typeof(AssemblyTests).Assembly.GetFile(""));
Assert.Null(typeof(AssemblyTests).Assembly.GetFile("NonExistentfile.dll"));
Assert.NotNull(typeof(AssemblyTests).Assembly.GetFile("System.Reflection.Tests.dll"));
- if (PlatformDetection.IsNotBrowser) // see https://github.com/dotnet/runtime/issues/39650
- Assert.Equal(typeof(AssemblyTests).Assembly.GetFile("System.Reflection.Tests.dll").Name, typeof(AssemblyTests).Assembly.Location);
+
+ string name = AssemblyPathHelper.GetAssemblyLocation(typeof(AssemblyTests).Assembly);
+ Assert.Equal(typeof(AssemblyTests).Assembly.GetFile("System.Reflection.Tests.dll").Name, name);
}
[Fact]
{
Assert.NotNull(typeof(AssemblyTests).Assembly.GetFiles());
Assert.Equal(1, typeof(AssemblyTests).Assembly.GetFiles().Length);
- if (PlatformDetection.IsNotBrowser) // see https://github.com/dotnet/runtime/issues/39650
- Assert.Equal(typeof(AssemblyTests).Assembly.GetFiles()[0].Name, typeof(AssemblyTests).Assembly.Location);
+
+ string name = AssemblyPathHelper.GetAssemblyLocation(typeof(AssemblyTests).Assembly);
+ Assert.Equal(typeof(AssemblyTests).Assembly.GetFiles()[0].Name, name);
}
public static IEnumerable<object[]> GetHashCode_TestData()
[Fact]
public void LoadFrom_SameIdentityAsAssemblyWithDifferentPath_ReturnsEqualAssemblies()
{
- Assembly assembly1 = Assembly.LoadFrom(typeof(AssemblyTests).Assembly.Location);
+ Assembly assembly1 = Assembly.LoadFrom(AssemblyPathHelper.GetAssemblyLocation(typeof(AssemblyTests).Assembly));
Assert.Equal(assembly1, typeof(AssemblyTests).Assembly);
Assembly assembly2 = Assembly.LoadFrom(LoadFromTestPath);
public void AssemblyLoadFromBytes()
{
Assembly assembly = typeof(AssemblyTests).Assembly;
- byte[] aBytes = System.IO.File.ReadAllBytes(assembly.Location);
+ byte[] aBytes = System.IO.File.ReadAllBytes(AssemblyPathHelper.GetAssemblyLocation(assembly));
Assembly loadedAssembly = Assembly.Load(aBytes);
Assert.NotNull(loadedAssembly);
public void AssemblyLoadFromBytesWithSymbols()
{
Assembly assembly = typeof(AssemblyTests).Assembly;
- byte[] aBytes = System.IO.File.ReadAllBytes(assembly.Location);
- byte[] symbols = System.IO.File.ReadAllBytes((System.IO.Path.ChangeExtension(assembly.Location, ".pdb")));
+ byte[] aBytes = System.IO.File.ReadAllBytes(AssemblyPathHelper.GetAssemblyLocation(assembly));
+ byte[] symbols = System.IO.File.ReadAllBytes((System.IO.Path.ChangeExtension(AssemblyPathHelper.GetAssemblyLocation(assembly), ".pdb")));
Assembly loadedAssembly = Assembly.Load(aBytes, symbols);
Assert.NotNull(loadedAssembly);
public void AssemblyReflectionOnlyLoadFromBytes()
{
Assembly assembly = typeof(AssemblyTests).Assembly;
- byte[] aBytes = System.IO.File.ReadAllBytes(assembly.Location);
+ byte[] aBytes = System.IO.File.ReadAllBytes(AssemblyPathHelper.GetAssemblyLocation(assembly));
Assert.Throws<PlatformNotSupportedException>(() => Assembly.ReflectionOnlyLoad(aBytes));
}
public class RuntimeIdentifierTests
{
[Fact]
- [ActiveIssue("https://github.com/dotnet/runtime/issues/39074", TestPlatforms.Browser)]
public void VerifyOSRid()
{
Assert.NotNull(RuntimeInformation.RuntimeIdentifier);
public SatelliteAssembliesTestsFixture()
{
AssemblyLoadContext satelliteAssembliesTests = new AssemblyLoadContext("SatelliteAssembliesTests");
- var satelliteAssembliesTestsPath = (PlatformDetection.IsBrowser ? "/" : "") + typeof(SatelliteAssembliesTests).Assembly.Location;
+ var satelliteAssembliesTestsPath = AssemblyPathHelper.GetAssemblyLocation(typeof(SatelliteAssembliesTests).Assembly);
satelliteAssembliesTests.LoadFromAssemblyPath(satelliteAssembliesTestsPath);
AssemblyLoadContext referencedClassLib = new AssemblyLoadContext("ReferencedClassLib");
- var referencedClassLibPath = (PlatformDetection.IsBrowser ? "/" : "") + typeof(ReferencedClassLib.Program).Assembly.Location;
+ var referencedClassLibPath = AssemblyPathHelper.GetAssemblyLocation(typeof(ReferencedClassLib.Program).Assembly);
referencedClassLib.LoadFromAssemblyPath(referencedClassLibPath);
AssemblyLoadContext referencedClassLibNeutralIsSatellite = new AssemblyLoadContext("ReferencedClassLibNeutralIsSatellite");
- var referencedClassLibNeutralIsSatellitePath = (PlatformDetection.IsBrowser ? "/" : "") + typeof(ReferencedClassLibNeutralIsSatellite.Program).Assembly.Location;
+ var referencedClassLibNeutralIsSatellitePath = AssemblyPathHelper.GetAssemblyLocation(typeof(ReferencedClassLibNeutralIsSatellite.Program).Assembly);
referencedClassLibNeutralIsSatellite.LoadFromAssemblyPath(referencedClassLibNeutralIsSatellitePath);
new AssemblyLoadContext("Empty");
[Fact]
public void FullyQualifiedName()
{
- Assert.Equal(Assembly.GetExecutingAssembly().Location, Module.FullyQualifiedName);
+ var loc = AssemblyPathHelper.GetAssemblyLocation(Assembly.GetExecutingAssembly());
+
+ // Browser will include the path (/), so strip it
+ if (PlatformDetection.IsBrowser && loc.Length > 1)
+ {
+ loc = loc.Substring(1);
+ }
+
+ Assert.Equal(loc, Module.FullyQualifiedName);
}
[Fact]
MONO_API MONO_RT_EXTERNAL_ONLY MonoAssembly *
mono_domain_assembly_open (MonoDomain *domain, const char *name);
+MONO_API void
+mono_domain_ensure_entry_assembly (MonoDomain *domain, MonoAssembly *assembly);
+
MONO_API mono_bool
mono_domain_finalize (MonoDomain *domain, uint32_t timeout);
for (i = 0; !image && bundles [i]; ++i) {
if (strcmp (bundles [i]->name, is_satellite ? filename : name) == 0) {
image = mono_image_open_from_data_internal (alc, (char*)bundles [i]->data, bundles [i]->size, FALSE, status, refonly, FALSE, name);
+#if defined(TARGET_WASM) && defined(ENABLE_NETCORE)
+ /*
+ * Since bundled images do not exist on disk, don't give them a legit file name.
+ * This is the expected behavior for single file exe's.
+ */
+ if (image->filename)
+ g_free (image->filename);
+
+ image->filename = NULL;
+#endif
break;
}
}
gboolean
mono_domain_set_fast (MonoDomain *domain, gboolean force);
-void
-mono_domain_ensure_entry_assembly (MonoDomain *domain, MonoAssembly *assembly);
-
MonoAssemblyLoadContext *
mono_domain_default_alc (MonoDomain *domain);
if (name.Length == 0)
throw new ArgumentException(SR.Argument_EmptyFileName);
- string location = Location;
- if (location != null && Path.GetFileName(location) == name)
- return new FileStream(location, FileMode.Open, FileAccess.Read);
- string filename = (string)GetFilesInternal(name, true);
- if (filename != null)
- return new FileStream(filename, FileMode.Open, FileAccess.Read);
+ RuntimeModule? m = (RuntimeModule?)GetModule(name);
+
+ if (m != null)
+ return new FileStream(m.FullyQualifiedName, FileMode.Open, FileAccess.Read);
else
return null;
}
public override FileStream[] GetFiles(bool getResourceModules)
{
- string[] names = (string[])GetFilesInternal(null, getResourceModules);
- if (names == null)
+ Module[] modules = GetModules(getResourceModules);
+
+ if (modules.Length == 0)
return Array.Empty<FileStream>();
- string location = Location;
+ FileStream[] res = new FileStream[modules.Length];
- FileStream[] res;
- if (location != string.Empty)
- {
- res = new FileStream[names.Length + 1];
- res[0] = new FileStream(location, FileMode.Open, FileAccess.Read);
- for (int i = 0; i < names.Length; ++i)
- res[i + 1] = new FileStream(names[i], FileMode.Open, FileAccess.Read);
- }
- else
+ for (int i = 0; i < modules.Length; i++)
{
- res = new FileStream[names.Length];
- for (int i = 0; i < names.Length; ++i)
- res[i] = new FileStream(names[i], FileMode.Open, FileAccess.Read);
+ RuntimeModule m = (RuntimeModule)modules[i];
+ res[i] = new FileStream(m.FullyQualifiedName, FileMode.Open, FileAccess.Read);
}
+
return res;
}
monoeg_g_setenv ("COMPlus_DebugWriteToStdErr", "1", 0);
#endif
+ const char *appctx_keys[2];
+ appctx_keys [0] = "APP_CONTEXT_BASE_DIRECTORY";
+ appctx_keys [1] = "RUNTIME_IDENTIFIER";
+
+ const char *appctx_values[2];
+ appctx_values [0] = "/";
+ appctx_values [1] = "browser-wasm";
+
+ monovm_initialize (2, appctx_keys, appctx_values);
+
mini_parse_debug_option ("top-runtime-invoke-unhandled");
mono_dl_fallback_register (wasm_dl_load, wasm_dl_symbol, NULL, NULL);
uint32_t entry = mono_image_get_entry_point (image);
if (!entry)
return NULL;
+
+ mono_domain_ensure_entry_assembly (root_domain, assembly);
return mono_get_method (image, entry, NULL);
}