diff --git a/tests/monotouch-test/mono/ConfigTest.cs b/tests/monotouch-test/mono/ConfigTest.cs index 36a554f115..32e7fd682e 100644 --- a/tests/monotouch-test/mono/ConfigTest.cs +++ b/tests/monotouch-test/mono/ConfigTest.cs @@ -13,8 +13,17 @@ namespace MonoTouchFixtures { [Test] public void Existence () { +#if NATIVEAOT +#if __MACCATALYST__ || __MACOS__ + var config_dir = Path.Combine (Path.GetDirectoryName (AppContext.BaseDirectory.TrimEnd ('/')), "MonoBundle"); +#else + var config_dir = AppContext.BaseDirectory; +#endif + var config_file = Path.Combine (config_dir, Assembly.GetExecutingAssembly ().GetName ().Name + ".dll.config"); +#else var config_file = Assembly.GetExecutingAssembly ().Location + ".config"; - Assert.True (File.Exists (config_file), "existence"); +#endif + Assert.That (config_file, Does.Exist, "existence"); Assert.That (File.ReadAllText (config_file), Contains.Substring ("Xamarin rocks"), "content"); } }