diff --git a/Directory.Build.props b/Directory.Build.props
index 1f4335e3f095d..043dbed1f5f74 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -20,6 +20,7 @@
<_hostOS Condition="'$(TargetOS)' == 'Browser'">Browser
$(_hostOS)
true
+ true
diff --git a/eng/pipelines/runtime-staging.yml b/eng/pipelines/runtime-staging.yml
index b9c723e0ebf7b..8e5e8630500e3 100644
--- a/eng/pipelines/runtime-staging.yml
+++ b/eng/pipelines/runtime-staging.yml
@@ -172,7 +172,7 @@ jobs:
jobParameters:
testGroup: innerloop
nameSuffix: AllSubsets_Mono
- buildArgs: -s mono+libs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=true /p:EnableSoftTrimming=true /p:BuildDarwinFrameworks=true
+ buildArgs: -s mono+libs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=true $(_runSmokeTestsOnlyArg) /p:BuildTestsOnHelix=true /p:UsePortableRuntimePack=true /p:BuildDarwinFrameworks=true
timeoutInMinutes: 180
condition: >-
or(
@@ -185,6 +185,7 @@ jobs:
extraStepsParameters:
creator: dotnet-bot
testRunNamePrefixSuffix: Mono_$(_BuildConfig)
+ extraHelixArguments: /p:NeedsToBuildAppsOnHelix=true
condition: >-
or(
eq(variables['librariesContainsChange'], true),
diff --git a/eng/testing/AppleHelixRunnerTemplate.sh b/eng/testing/AppleHelixRunnerTemplate.sh
new file mode 100644
index 0000000000000..467b98f3d5d74
--- /dev/null
+++ b/eng/testing/AppleHelixRunnerTemplate.sh
@@ -0,0 +1,5 @@
+XHARNESS_EXECUTION_DIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
+XHARNESS_OUT="$XHARNESS_EXECUTION_DIR/xharness-output"
+
+# RunCommands defined in tests.mobile.targets
+[[RunCommands]]
\ No newline at end of file
diff --git a/eng/testing/AppleRunnerTemplate.sh b/eng/testing/AppleRunnerTemplate.sh
index 42f787af20d88..0ebff54c48393 100644
--- a/eng/testing/AppleRunnerTemplate.sh
+++ b/eng/testing/AppleRunnerTemplate.sh
@@ -7,15 +7,18 @@ ASSEMBLY_NAME=$1
TARGET_ARCH=$2
TARGET_OS=$3
TEST_NAME=$4
+CONFIGURATION=$5
XHARNESS_CMD="test"
XHARNESS_OUT="$EXECUTION_DIR/xharness-output"
XCODE_PATH=$(xcode-select -p)/../..
-if [ -n "$5" ]; then
+if [ -n "$6" ]; then
XHARNESS_CMD="run"
- ADDITIONAL_ARGS=${@:5}
+ ADDITIONAL_ARGS=${@:6}
fi
+if [[ "$CONFIGURATION" != "Debug" ]]; then $CONFIGURATION="Release"; fi
+
if [[ "$TARGET_OS" == "maccatalyst" ]]; then TARGET=maccatalyst; fi
if [[ "$TARGET_OS" == "iossimulator" && "$TARGET_ARCH" == "x86" ]]; then TARGET=ios-simulator-32; fi
@@ -29,11 +32,11 @@ if [[ "$TARGET_OS" == "tvossimulator" && "$TARGET_ARCH" == "arm64" ]]; then TARG
if [[ "$TARGET_OS" == "tvos" && "$TARGET_ARCH" == "arm64" ]]; then TARGET=tvos-device; fi
# "Release" in SCHEME_SDK is what xcode produces (see "bool Optimized" property in AppleAppBuilderTask)
-if [[ "$TARGET" == "ios-simulator-"* ]]; then SCHEME_SDK=Release-iphonesimulator; fi
-if [[ "$TARGET" == "tvos-simulator" ]]; then SCHEME_SDK=Release-appletvsimulator; fi
-if [[ "$TARGET" == "ios-device" ]]; then SCHEME_SDK=Release-iphoneos; fi
-if [[ "$TARGET" == "tvos-device" ]]; then SCHEME_SDK=Release-appletvos; fi
-if [[ "$TARGET" == "maccatalyst" ]]; then SCHEME_SDK=Release-maccatalyst; fi
+if [[ "$TARGET" == "ios-simulator-"* ]]; then SCHEME_SDK=$CONFIGURATION-iphonesimulator; fi
+if [[ "$TARGET" == "tvos-simulator" ]]; then SCHEME_SDK=$CONFIGURATION-appletvsimulator; fi
+if [[ "$TARGET" == "ios-device" ]]; then SCHEME_SDK=$CONFIGURATION-iphoneos; fi
+if [[ "$TARGET" == "tvos-device" ]]; then SCHEME_SDK=$CONFIGURATION-appletvos; fi
+if [[ "$TARGET" == "maccatalyst" ]]; then SCHEME_SDK=$CONFIGURATION-maccatalyst; fi
if [[ "$TARGET" == "ios-device" || "$TARGET" == "tvos-device" ]]; then SIGNAL_APP_END="--signal-app-end"; fi
diff --git a/eng/testing/tests.ioslike.targets b/eng/testing/tests.ioslike.targets
new file mode 100644
index 0000000000000..8c7a6a44a5d22
--- /dev/null
+++ b/eng/testing/tests.ioslike.targets
@@ -0,0 +1,187 @@
+
+
+ $(BundleTestAppTargets);BundleTestAppleApp
+
+
+
+ helix
+ helix
+ local
+
+
+
+ <_AOTBuildCommand>export PATH=$HELIX_CORRELATION_PAYLOAD/build/cmake/cmake-3.16.4-Darwin-x86_64/CMake.app/Contents/bin:$PATH &&
+ <_AOTBuildCommand>$(_AOTBuildCommand) dotnet msbuild publish/ProxyProjectForAOTOnHelix.proj /bl:$XHARNESS_OUT/AOTBuild.binlog
+
+
+ <_AOTBuildCommand Condition="'$(ContinuousIntegrationBuild)' != 'true'">$(_AOTBuildCommand) /p:RuntimeSrcDir=$(RepoRoot) /p:RuntimeConfig=$(Configuration)
+
+ <_AOTBuildCommand>$(_AOTBuildCommand) /p:XHARNESS_EXECUTION_DIR="$XHARNESS_EXECUTION_DIR" /p:RunAOTCompilation=$(RunAOTCompilation) /p:TargetOS=$(TargetOS) /p:TargetArchitecture=$(TargetArchitecture) /p:MonoForceInterpreter=$(MonoForceInterpreter) /p:MonoEnableLLVM=true /p:DevTeamProvisioning=$(DevTeamProvisioning) /p:UsePortableRuntimePack=true /p:Configuration=$(Configuration)
+ <_AOTBuildCommand>$(_AOTBuildCommand)
+
+ <_ResetSimulatorSwitch Condition="'$(TargetOS)' == 'iOSSimulator' or '$(TargetOS)' == 'tvOSSimulator'">--reset-simulator
+ <_SignalAppEndSwitch Condition="'$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'tvOS'">--signal-app-end
+
+ <_AfterBuildCommands>
+ mv $XHARNESS_OUT/AOTBuild.binlog "$HELIX_WORKITEM_UPLOAD_ROOT"
+ sign "$app"
+ xharness apple test --app "$app" --output-directory "$output_directory" --target "$target" --timeout "$timeout" --xcode "$xcode_path" -v --launch-timeout "$launch_timeout" $(_ResetSimulatorSwitch) $(_SignalAppEndSwitch) --
+
+
+ $(_AOTBuildCommand) $(_AfterBuildCommands)
+
+
+
+
+
+
+ PrepareForAppleBuildApp;$(AppleBuildAppDependsOn);_CopyTestArchive
+
+ AppleBuildApp
+ $(BundleTestAppleAppDependsOn);_BundleAOTTestAppleAppForHelix;_CopyTestArchive
+
+
+
+
+
+
+
+
+ $(BundleDir)publish
+
+
+
+ <_MainAssemblyPath Condition="'%(AppleAssembliesToBundle.FileName)' == $(AssemblyName) and '%(AppleAssembliesToBundle.Extension)' == '.dll'">%(AppleAssembliesToBundle.Identity)
+ $([System.IO.Path]::ChangeExtension($(_MainAssemblyPath), '.runtimeconfig.json'))
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_BundlePdbFiles Include="$([System.IO.Path]::ChangeExtension('%(AppleAssembliesToBundle.Identity)', '.pdb'))" />
+
+
+
+
+
+
+
+
+ <_PublishBundleFiles Include="@(BundleFiles->'$(AppBundlePath)/%(FileName)%(Extension)')" />
+
+ <_RuntimePackFiles Include="$(MicrosoftNetCoreAppRuntimePackRidLibTfmDir)**\*.*" />
+ <_RuntimePackFiles Include="$(MicrosoftNetCoreAppRuntimePackNativeDir)*.*" />
+
+ <_UnusedRuntimePackFiles Include="@(_PublishBundleFiles)" Exclude="@(_RuntimePackFiles->'$(AppBundlePath)/%(FileName)%(Extension)')" />
+ <_UsedRuntimePackFiles Include="@(_PublishBundleFiles)" Exclude="@(_UnusedRuntimePackFiles)" />
+
+ <_RuntimePackFilesToDelete Include="@(_RuntimePackFiles->'$(AppBundlePath)/%(FileName)%(Extension)')" />
+
+
+
+
+
+
+
+ <_ApplePropertyNames Include="InvariantGlobalization" />
+ <_ApplePropertyNames Include="AssemblyName" />
+ <_ApplePropertyNames Include="MonoEnableLLVM" />
+
+ <_ApplePropertiesToPass
+ Include="$(%(_ApplePropertyNames.Identity))"
+ Name="%(_ApplePropertyNames.Identity)"
+ ConditionToUse__="%(_ApplePropertyNames.ConditionToUse__)" />
+
+ <_AppleUsedRuntimePackFiles
+ Include="@(_UsedRuntimePackFiles->'%(FileName)%(Extension)')"
+ RemoveMetadata="_IsNative;TargetDir" />
+
+ <_AppleItemsToPass Include="@(_AppleUsedRuntimePackFiles)"
+ OriginalItemName__="_AppleUsedRuntimePackFiles" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ AppleTestRunner.dll
+
+ $(PublishDir)
+ $(BundleDir)
+
+
+
+ true
+ false
+ false
+ true
+
+
+
+
+ <_InternalForceInterpret>true
+ <_IsNative>true
+
+
+ <_PublishAssemblies Include="$(PublishDir)\**\*.dll" Exclude="$(PublishDir)\**\*.resources.dll" />
+ <_SatelliteAssemblies Include="$(PublishDir)\**\*.resources.dll" />
+
+
+ <_InternalForceInterpret Condition="'$(UseMonoJustInterp)' == 'true' and '%(FileName)%(Extension)' != 'System.Private.CoreLib.dll'">true
+ <_IsNative>false
+
+
+
+
+
+
+
+
+
+
+ <_AppBundleDir>$(AppBundlePath)/../
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/eng/testing/tests.mobile.targets b/eng/testing/tests.mobile.targets
index 481a3091b64ac..17783b7ed5ec4 100644
--- a/eng/testing/tests.mobile.targets
+++ b/eng/testing/tests.mobile.targets
@@ -6,13 +6,16 @@
$(AppBundleRoot)runonly\$(AssemblyName)
$([MSBuild]::NormalizeDirectory('$(PublishDir)', 'AppBundle'))
$([MSBuild]::NormalizePath('$(BundleDir)', '$(RunScriptOutputName)'))
- true
-
+
true
- BundleTestAppleApp;BundleTestAndroidApp
+ BundleTestAndroidApp
Publish
+
+ true
+
+
true
@@ -33,7 +36,8 @@
- --expected-exit-code $(ExpectedExitCode)
+ $(Configuration)
+ $(AdditionalXHarnessArguments) --expected-exit-code $(ExpectedExitCode)
@@ -51,12 +55,15 @@
+
+
+
<_MobileIntermediateOutputPath>$(IntermediateOutputPath)mobile
-
-
@@ -149,126 +156,16 @@
Condition="'$(ArchiveTests)' == 'true' and '$(IgnoreForCI)' != 'true'" />
-
-
-
-
-
-
-
-
-
-
-
-
-
- true
- AppleTestRunner.dll
- <_MobileIntermediateOutputPath Condition="'$(RunAOTCompilation)' == 'true'">$(IntermediateOutputPath)mobile
- true
- false
- false
- true
-
-
- Full
- Full
- JustInterp
-
-
- <_AotExcludeAssemblies Include="$(PublishDir)System.Runtime.WindowsRuntime.dll" />
- <_AotExcludeAssemblies Include="@(NativeLibraries->'$(PublishDir)%(Identity)')" />
-
-
- <_AotIncludeAssemblies Condition="'$(RunAOTCompilation)' == 'true' and '$(AOTMode)' == 'JustInterp'" Include="$(PublishDir)System.Private.CoreLib.dll" />
- <_AotIncludeAssemblies Condition="'$(RunAOTCompilation)' == 'true' and '$(AOTMode)' != 'JustInterp'" Include="$(PublishDir)*.dll" />
-
-
- @(MonoAOTCompilerDefaultAotArguments, ';')
- @(MonoAOTCompilerDefaultProcessArguments, ';')
-
-
- <_BundleNonAotAssemblies Condition="'$(RunAOTCompilation)' == 'true' and '$(AOTMode)' == 'JustInterp'" Include="$(PublishDir)*.dll" Exclude="$(PublishDir)System.Private.CoreLib.dll" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_appFiles Include="$(AppBundlePath)/../**/*" />
-
-
-
-
-
-
-
- Link
- CopyUsed
+ link
+ copyused
-
+
+
+
+
+
+
+
-
+
+
+
RunnerTemplate.cmd
RunnerTemplate.sh
- AppleRunnerTemplate.sh
+ AppleHelixRunnerTemplate.sh
+ AppleRunnerTemplate.sh
AndroidRunnerTemplate.sh
WasmRunnerTemplate.sh
WasmRunnerTemplate.cmd
@@ -12,6 +13,7 @@
$(MSBuildThisFileDirectory)$(RunScriptInputName)
RunTests.sh
+ build-apple-app.sh
RunTests.cmd
$([MSBuild]::NormalizePath('$(OutDir)', '$(RunScriptOutputName)'))
@@ -42,9 +44,12 @@
+ DependsOnTargets="GenerateRunScript;ZipTestArchive" />
+
+
diff --git a/src/libraries/Common/tests/Extensions/ConfigurationRootTest.cs b/src/libraries/Common/tests/Extensions/ConfigurationRootTest.cs
index d61144d0e4313..44ea87e8a78a5 100644
--- a/src/libraries/Common/tests/Extensions/ConfigurationRootTest.cs
+++ b/src/libraries/Common/tests/Extensions/ConfigurationRootTest.cs
@@ -37,7 +37,8 @@ public void RootDisposesProviders()
Assert.True(provider5.IsDisposed);
}
- [Fact]
+ // Moq heavily utilizes RefEmit, which does not work on most aot workloads
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void RootDisposesChangeTokenRegistrations()
{
var changeToken = new ChangeToken();
diff --git a/src/libraries/Common/tests/System/Xml/XmlCoreTest/FilePathUtil.cs b/src/libraries/Common/tests/System/Xml/XmlCoreTest/FilePathUtil.cs
index 982dedfede9da..4524d11ceab4c 100644
--- a/src/libraries/Common/tests/System/Xml/XmlCoreTest/FilePathUtil.cs
+++ b/src/libraries/Common/tests/System/Xml/XmlCoreTest/FilePathUtil.cs
@@ -42,6 +42,11 @@ public static string GetHttpStandardPath()
return Path.Combine(GetHttpDataPath(), "StandardTests");
}
+ public static string GetWriteableTestRootPath()
+ {
+ return (PlatformDetection.IsiOS || PlatformDetection.IstvOS) ? Path.GetTempPath() : string.Empty;
+ }
+
public static string GetTestDataPath()
{
return Path.Combine(GetDataPath(), "TestData");
diff --git a/src/libraries/Common/tests/System/Xml/XmlCoreTest/XmlCoreTest.csproj b/src/libraries/Common/tests/System/Xml/XmlCoreTest/XmlCoreTest.csproj
index ecef82389ff63..c83346ac205bc 100644
--- a/src/libraries/Common/tests/System/Xml/XmlCoreTest/XmlCoreTest.csproj
+++ b/src/libraries/Common/tests/System/Xml/XmlCoreTest/XmlCoreTest.csproj
@@ -19,5 +19,6 @@
+
\ No newline at end of file
diff --git a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs
index c4e2e657c07ab..b153e3f525e6a 100644
--- a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs
+++ b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs
@@ -38,8 +38,10 @@ public static partial class PlatformDetection
public static bool IsSolaris => RuntimeInformation.IsOSPlatform(OSPlatform.Create("SOLARIS"));
public static bool IsBrowser => RuntimeInformation.IsOSPlatform(OSPlatform.Create("BROWSER"));
public static bool IsNotBrowser => !IsBrowser;
- public static bool IsMobile => IsBrowser || IsMacCatalyst || IsiOS || IstvOS || IsAndroid;
+ public static bool IsMobile => IsBrowser || IsAppleMobile || IsAndroid;
public static bool IsNotMobile => !IsMobile;
+ public static bool IsAppleMobile => IsMacCatalyst || IsiOS || IstvOS;
+ public static bool IsNotAppleMobile => !IsAppleMobile;
public static bool IsNotNetFramework => !IsNetFramework;
public static bool IsArmProcess => RuntimeInformation.ProcessArchitecture == Architecture.Arm;
@@ -61,9 +63,10 @@ public static partial class PlatformDetection
public static bool IsThreadingSupported => !IsBrowser;
public static bool IsBinaryFormatterSupported => IsNotMobile;
+ public static bool IsSymLinkSupported => !IsiOS && !IstvOS;
public static bool IsSpeedOptimized => !IsSizeOptimized;
- public static bool IsSizeOptimized => IsBrowser || IsAndroid || IsiOS || IstvOS || IsMacCatalyst;
+ public static bool IsSizeOptimized => IsBrowser || IsAndroid || IsAppleMobile;
public static bool IsBrowserDomSupported => GetIsBrowserDomSupported();
public static bool IsBrowserDomSupportedOrNotBrowser => IsNotBrowser || GetIsBrowserDomSupported();
@@ -130,6 +133,7 @@ public static bool IsDrawingSupported
#if NETCOREAPP
public static bool IsReflectionEmitSupported => RuntimeFeature.IsDynamicCodeSupported;
+ public static bool IsNotReflectionEmitSupported => !IsReflectionEmitSupported;
#else
public static bool IsReflectionEmitSupported => true;
#endif
@@ -138,7 +142,7 @@ public static bool IsDrawingSupported
// System.Security.Cryptography.Xml.XmlDsigXsltTransform.GetOutput() relies on XslCompiledTransform which relies
// heavily on Reflection.Emit
- public static bool IsXmlDsigXsltTransformSupported => !PlatformDetection.IsInAppContainer;
+ public static bool IsXmlDsigXsltTransformSupported => !PlatformDetection.IsInAppContainer && IsReflectionEmitSupported;
public static bool IsPreciseGcSupported => !IsMonoRuntime;
diff --git a/src/libraries/Directory.Build.props b/src/libraries/Directory.Build.props
index 635f2bfc037ce..2412b8d4ed861 100644
--- a/src/libraries/Directory.Build.props
+++ b/src/libraries/Directory.Build.props
@@ -116,7 +116,7 @@
$(TestArchiveTestsRoot)$(OSPlatformConfig)/
$(TestArchiveRoot)runtime/
- true
+ true
$(ArtifactsDir)bundles\
$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'ref', '$(NetCoreAppCurrent)'))
diff --git a/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/tests/FileConfigurationProviderTest.cs b/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/tests/FileConfigurationProviderTest.cs
index 1913f764d0c30..bee80f1f9d9a9 100644
--- a/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/tests/FileConfigurationProviderTest.cs
+++ b/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/tests/FileConfigurationProviderTest.cs
@@ -13,7 +13,8 @@ namespace Microsoft.Extensions.Configuration.FileExtensions.Test
{
public class FileConfigurationProviderTest
{
- [Fact]
+ // Moq heavily utilizes RefEmit, which does not work on most aot workloads
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void ProviderDisposesChangeTokenRegistration()
{
var changeToken = new ConfigurationRootTest.ChangeToken();
@@ -39,7 +40,8 @@ public void ProviderDisposesChangeTokenRegistration()
new object[] { @$"{Path.DirectorySeparatorChar}{Guid.NewGuid()}{Path.DirectorySeparatorChar}configuration.txt" }
};
- [Fact]
+ // Moq heavily utilizes RefEmit, which does not work on most aot workloads
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/52319", TestPlatforms.Android)]
public void ProviderThrowsInvalidDataExceptionWhenLoadFails()
{
@@ -72,7 +74,7 @@ public void ProviderThrowsInvalidDataExceptionWhenLoadFails()
}
}
- [Theory]
+ [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
[MemberData(nameof(ProviderThrowsInvalidDataExceptionInput))]
public void ProviderThrowsFileNotFoundExceptionWhenNotFound(string physicalPath)
{
@@ -91,7 +93,7 @@ public void ProviderThrowsFileNotFoundExceptionWhenNotFound(string physicalPath)
Assert.Contains(physicalPath, exception.Message);
}
- [Theory]
+ [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
[MemberData(nameof(ProviderThrowsInvalidDataExceptionInput))]
public void ProviderThrowsDirectoryNotFoundExceptionWhenNotFound(string physicalPath)
{
diff --git a/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/tests/ConfigurationExtensionTest.cs b/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/tests/ConfigurationExtensionTest.cs
index 03667ab17b33c..e0d86e456227c 100644
--- a/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/tests/ConfigurationExtensionTest.cs
+++ b/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/tests/ConfigurationExtensionTest.cs
@@ -53,6 +53,7 @@ private void SetSecret(string id, string key, string value)
[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/34582", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/60584", TestPlatforms.iOS | TestPlatforms.tvOS)]
public void AddUserSecrets_FindsAssemblyAttribute()
{
var randValue = Guid.NewGuid().ToString();
@@ -68,6 +69,7 @@ public void AddUserSecrets_FindsAssemblyAttribute()
[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/34582", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/60584", TestPlatforms.iOS | TestPlatforms.tvOS)]
public void AddUserSecrets_FindsAssemblyAttributeFromType()
{
var randValue = Guid.NewGuid().ToString();
@@ -122,6 +124,7 @@ public void AddUserSecrets_DoesThrowsIfNotOptionalAndSecretDoesNotExist()
[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/34582", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/60584", TestPlatforms.iOS | TestPlatforms.tvOS)]
public void AddUserSecrets_With_SecretsId_Passed_Explicitly()
{
var userSecretsId = Guid.NewGuid().ToString();
diff --git a/src/libraries/Microsoft.Extensions.Configuration/tests/ConfigurationManagerTest.cs b/src/libraries/Microsoft.Extensions.Configuration/tests/ConfigurationManagerTest.cs
index 89da788351754..256d15a16c625 100644
--- a/src/libraries/Microsoft.Extensions.Configuration/tests/ConfigurationManagerTest.cs
+++ b/src/libraries/Microsoft.Extensions.Configuration/tests/ConfigurationManagerTest.cs
@@ -171,7 +171,8 @@ public void DisposesProvidersOnRemoval()
Assert.True(provider5.IsDisposed);
}
- [Fact]
+ // Moq heavily utilizes RefEmit, which does not work on most aot workloads
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void DisposesChangeTokenRegistrationsOnDispose()
{
var changeToken = new TestChangeToken();
@@ -189,7 +190,8 @@ public void DisposesChangeTokenRegistrationsOnDispose()
Assert.Empty(changeToken.Callbacks);
}
- [Fact]
+ // Moq heavily utilizes RefEmit, which does not work on most aot workloads
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void DisposesChangeTokenRegistrationsOnRemoval()
{
var changeToken = new TestChangeToken();
diff --git a/src/libraries/Microsoft.Extensions.Configuration/tests/FunctionalTests/ArrayTests.cs b/src/libraries/Microsoft.Extensions.Configuration/tests/FunctionalTests/ArrayTests.cs
index 0ef348ac163fd..d173c3e3cdb68 100644
--- a/src/libraries/Microsoft.Extensions.Configuration/tests/FunctionalTests/ArrayTests.cs
+++ b/src/libraries/Microsoft.Extensions.Configuration/tests/FunctionalTests/ArrayTests.cs
@@ -48,6 +48,7 @@ public class ArrayTests : IDisposable
[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/34582", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/60583", TestPlatforms.iOS | TestPlatforms.tvOS)]
public void DifferentConfigSources_Merged_KeysAreSorted()
{
var config = BuildConfig();
@@ -77,6 +78,7 @@ public void DifferentConfigSources_Merged_KeysAreSorted()
[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/34582", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/60583", TestPlatforms.iOS | TestPlatforms.tvOS)]
public void DifferentConfigSources_Merged_WithOverwrites()
{
var config = BuildConfig();
@@ -103,7 +105,17 @@ private IConfiguration BuildConfig()
public ArrayTests()
{
- var basePath = AppContext.BaseDirectory ?? string.Empty;
+ string basePath;
+
+ if (PlatformDetection.IsAppleMobile && !PlatformDetection.IsMacCatalyst)
+ {
+ basePath = Path.GetTempPath();
+ }
+ else
+ {
+ basePath = AppContext.BaseDirectory ?? string.Empty;
+ }
+
_iniConfigFilePath = Path.GetRandomFileName();
_xmlConfigFilePath = Path.GetRandomFileName();
_json1ConfigFilePath = Path.GetRandomFileName();
diff --git a/src/libraries/Microsoft.Extensions.Configuration/tests/FunctionalTests/ConfigurationTests.cs b/src/libraries/Microsoft.Extensions.Configuration/tests/FunctionalTests/ConfigurationTests.cs
index d397549609401..9314f4e0dd333 100644
--- a/src/libraries/Microsoft.Extensions.Configuration/tests/FunctionalTests/ConfigurationTests.cs
+++ b/src/libraries/Microsoft.Extensions.Configuration/tests/FunctionalTests/ConfigurationTests.cs
@@ -362,6 +362,7 @@ public IConfigurationProvider Build(IConfigurationBuilder builder)
[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/34582", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/60583", TestPlatforms.iOS | TestPlatforms.tvOS)]
public void OnLoadErrorWillBeCalledOnJsonParseError()
{
_fileSystem.WriteFile(Path.Combine(_basePath, "error.json"), @"{""JsonKey1"": ", absolute: true);
@@ -873,6 +874,7 @@ public void SetBasePathCalledMultipleTimesForEachSourceLastOneWins()
[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/34582", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/60583", TestPlatforms.iOS | TestPlatforms.tvOS)]
public void GetDefaultBasePathForSources()
{
var builder = new ConfigurationBuilder();
diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/tests/CompilationLibraryTests.cs b/src/libraries/Microsoft.Extensions.DependencyModel/tests/CompilationLibraryTests.cs
index a3f2d8acc9e92..82af4c38d17e9 100644
--- a/src/libraries/Microsoft.Extensions.DependencyModel/tests/CompilationLibraryTests.cs
+++ b/src/libraries/Microsoft.Extensions.DependencyModel/tests/CompilationLibraryTests.cs
@@ -13,7 +13,8 @@ namespace Microsoft.Extensions.DependencyModel.Tests
{
public class CompilationLibraryTests
{
- [Fact]
+ // Moq heavily utilizes RefEmit, which does not work on most aot workloads
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void ResolveReferencePathsAcceptsCustomResolvers()
{
var fail = new Mock();
@@ -49,6 +50,7 @@ public void ResolveReferencePathsAcceptsCustomResolvers()
}
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/60583", TestPlatforms.iOS | TestPlatforms.tvOS)]
public void ResolveReferencePathsAcceptsNullCustomResolvers()
{
var library = TestLibraryFactory.Create();
diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/tests/CompositeResolverTests.cs b/src/libraries/Microsoft.Extensions.DependencyModel/tests/CompositeResolverTests.cs
index 99fb51405af9b..585fc4e023406 100644
--- a/src/libraries/Microsoft.Extensions.DependencyModel/tests/CompositeResolverTests.cs
+++ b/src/libraries/Microsoft.Extensions.DependencyModel/tests/CompositeResolverTests.cs
@@ -14,7 +14,8 @@ namespace Microsoft.Extensions.DependencyModel.Tests
{
public class CompositeResolverTests
{
- [Fact]
+ // Moq heavily utilizes RefEmit, which does not work on most aot workloads
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void ReturnsFirstSuccesfullResolve()
{
var fail = new Mock();
@@ -44,7 +45,8 @@ public void ReturnsFirstSuccesfullResolve()
Times.Never());
}
- [Fact]
+ // Moq heavily utilizes RefEmit, which does not work on most aot workloads
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void PassesLibraryToAllResolvers()
{
var fail = new Mock();
@@ -64,7 +66,8 @@ public void PassesLibraryToAllResolvers()
failTwo.Verify(r => r.TryResolveAssemblyPaths(library, null), Times.Once());
}
- [Fact]
+ // Moq heavily utilizes RefEmit, which does not work on most aot workloads
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void PopulatedAssemblies()
{
var fail = new Mock();
diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Composite/tests/CompositeFileProviderTests.cs b/src/libraries/Microsoft.Extensions.FileProviders.Composite/tests/CompositeFileProviderTests.cs
index da09149c1adbb..6a56349337166 100644
--- a/src/libraries/Microsoft.Extensions.FileProviders.Composite/tests/CompositeFileProviderTests.cs
+++ b/src/libraries/Microsoft.Extensions.FileProviders.Composite/tests/CompositeFileProviderTests.cs
@@ -93,7 +93,8 @@ public void GetDirectoryContents_ReturnsNonExistingEmptySequence_IfResourcesDoNo
Assert.Empty(files);
}
- [Fact]
+ // Moq heavily utilizes RefEmit, which does not work on most aot workloads
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void GetDirectoryContents_ReturnsCombinaisionOFFiles()
{
// Arrange
@@ -121,7 +122,8 @@ public void GetDirectoryContents_ReturnsCombinaisionOFFiles()
file => Assert.Same(file3, file));
}
- [Fact]
+ // Moq heavily utilizes RefEmit, which does not work on most aot workloads
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void GetDirectoryContents_ReturnsCombinaitionOFFiles_WhenSomeFileProviderRetunsNoContent()
{
// Arrange
diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/PhysicalFileProviderTests.netcoreapp.cs b/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/PhysicalFileProviderTests.netcoreapp.cs
index 1e7178776e380..e178b1694eef8 100644
--- a/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/PhysicalFileProviderTests.netcoreapp.cs
+++ b/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/PhysicalFileProviderTests.netcoreapp.cs
@@ -12,7 +12,7 @@ namespace Microsoft.Extensions.FileProviders
{
public partial class PhysicalFileProviderTests : FileCleanupTestBase
{
- [Theory]
+ [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsSymLinkSupported))]
[InlineData(false)]
[InlineData(true)]
public async Task UsePollingFileWatcher_UseActivePolling_HasChanged_SymbolicLink(bool useWildcard)
@@ -45,7 +45,7 @@ public async Task UsePollingFileWatcher_UseActivePolling_HasChanged_SymbolicLink
$"Change event was not raised - current time: {DateTime.UtcNow:O}, file LastWriteTimeUtc: {File.GetLastWriteTimeUtc(filePath):O}.");
}
- [Theory]
+ [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsSymLinkSupported))]
[OuterLoop]
[InlineData(false)]
[InlineData(true)]
@@ -70,7 +70,7 @@ public async Task UsePollingFileWatcher_UseActivePolling_HasChanged_SymbolicLink
await Assert.ThrowsAsync(() => tcs.Task);
}
- [Theory]
+ [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsSymLinkSupported))]
[InlineData(false, false)]
[InlineData(false, true)]
[InlineData(true, false)]
@@ -119,7 +119,7 @@ public async Task UsePollingFileWatcher_UseActivePolling_HasChanged_SymbolicLink
catch (UnauthorizedAccessException) { }
}
- [Theory]
+ [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsSymLinkSupported))]
[InlineData(false)]
[InlineData(true)]
public async Task UsePollingFileWatcher_UseActivePolling_HasChanged_SymbolicLink_TargetDeleted(bool useWildcard)
diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/PollingWildCardChangeTokenTest.cs b/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/PollingWildCardChangeTokenTest.cs
index e1994076af948..bd0bc7b82805c 100644
--- a/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/PollingWildCardChangeTokenTest.cs
+++ b/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/PollingWildCardChangeTokenTest.cs
@@ -14,7 +14,8 @@ namespace Microsoft.Extensions.FileProviders.Physical
{
public class PollingWildCardChangeTokenTest
{
- [Fact]
+ // Moq heavily utilizes RefEmit, which does not work on most aot workloads
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void HasChanged_ReturnsFalseIfNoFilesExist()
{
// Arrange
@@ -32,7 +33,8 @@ public void HasChanged_ReturnsFalseIfNoFilesExist()
Assert.False(result);
}
- [Fact]
+ // Moq heavily utilizes RefEmit, which does not work on most aot workloads
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void HasChanged_ReturnsFalseIfFilesDoNotChange()
{
// Arrange
@@ -52,7 +54,8 @@ public void HasChanged_ReturnsFalseIfFilesDoNotChange()
Assert.False(result);
}
- [Fact]
+ // Moq heavily utilizes RefEmit, which does not work on most aot workloads
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void HasChanged_ReturnsTrueIfNewFilesWereAdded()
{
// Arrange
@@ -82,7 +85,8 @@ public void HasChanged_ReturnsTrueIfNewFilesWereAdded()
Assert.True(result2);
}
- [Fact]
+ // Moq heavily utilizes RefEmit, which does not work on most aot workloads
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void HasChanged_ReturnsTrueIfFilesWereRemoved()
{
// Arrange
@@ -111,7 +115,8 @@ public void HasChanged_ReturnsTrueIfFilesWereRemoved()
Assert.True(result2);
}
- [Fact]
+ // Moq heavily utilizes RefEmit, which does not work on most aot workloads
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void HasChanged_ReturnsTrueIfFilesWereModified()
{
// Arrange
@@ -139,7 +144,8 @@ public void HasChanged_ReturnsTrueIfFilesWereModified()
Assert.True(result2);
}
- [Fact]
+ // Moq heavily utilizes RefEmit, which does not work on most aot workloads
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void HasChanged_ReturnsTrueIfFileWasModifiedButRetainedAnOlderTimestamp()
{
// Arrange
diff --git a/src/libraries/Microsoft.Extensions.Http/tests/Microsoft.Extensions.Http.Tests/DefaultHttpClientFactoryTest.cs b/src/libraries/Microsoft.Extensions.Http/tests/Microsoft.Extensions.Http.Tests/DefaultHttpClientFactoryTest.cs
index 72d89b17f8ab5..9a795e2f9724d 100644
--- a/src/libraries/Microsoft.Extensions.Http/tests/Microsoft.Extensions.Http.Tests/DefaultHttpClientFactoryTest.cs
+++ b/src/libraries/Microsoft.Extensions.Http/tests/Microsoft.Extensions.Http.Tests/DefaultHttpClientFactoryTest.cs
@@ -82,7 +82,8 @@ public void Factory_MultipleCalls_CachesHandler()
Assert.NotSame(client1, client2);
}
- [Fact]
+ // Moq heavily utilizes RefEmit, which does not work on most aot workloads
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void Factory_DisposeClient_DoesNotDisposeHandler()
{
// Arrange
@@ -107,7 +108,8 @@ public void Factory_DisposeClient_DoesNotDisposeHandler()
// Assert (does not throw)
}
- [Fact]
+ // Moq heavily utilizes RefEmit, which does not work on most aot workloads
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void Factory_DisposeHandler_DoesNotDisposeInnerHandler()
{
// Arrange
@@ -170,7 +172,8 @@ public void Factory_CreateClient_WithName_UsesNamedOptions()
Assert.Equal(1, count);
}
- [Fact]
+ // Moq heavily utilizes RefEmit, which does not work on most aot workloads
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void Factory_CreateClient_FiltersCanDecorateBuilder()
{
// Arrange
diff --git a/src/libraries/Microsoft.Extensions.Http/tests/Microsoft.Extensions.Http.Tests/DefaultHttpMessageHandlerBuilderTest.cs b/src/libraries/Microsoft.Extensions.Http/tests/Microsoft.Extensions.Http.Tests/DefaultHttpMessageHandlerBuilderTest.cs
index 426bf7195ebd4..47b206ac326d9 100644
--- a/src/libraries/Microsoft.Extensions.Http/tests/Microsoft.Extensions.Http.Tests/DefaultHttpMessageHandlerBuilderTest.cs
+++ b/src/libraries/Microsoft.Extensions.Http/tests/Microsoft.Extensions.Http.Tests/DefaultHttpMessageHandlerBuilderTest.cs
@@ -31,8 +31,8 @@ public void Ctor_SetsPrimaryHandler()
Assert.IsType(builder.PrimaryHandler);
}
-
- [Fact]
+ // Moq heavily utilizes RefEmit, which does not work on most aot workloads
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void Build_NoAdditionalHandlers_ReturnsPrimaryHandler()
{
// Arrange
@@ -48,7 +48,8 @@ public void Build_NoAdditionalHandlers_ReturnsPrimaryHandler()
Assert.Same(builder.PrimaryHandler, handler);
}
- [Fact]
+ // Moq heavily utilizes RefEmit, which does not work on most aot workloads
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void Build_SomeAdditionalHandlers_PutsTogetherDelegatingHandlers()
{
// Arrange
@@ -108,7 +109,8 @@ public void Build_AdditionalHandlerIsNull_ThrowsException()
Assert.Equal("The 'additionalHandlers' must not contain a null entry.", exception.Message);
}
- [Fact]
+ // Moq heavily utilizes RefEmit, which does not work on most aot workloads
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/50873", TestPlatforms.Android)]
public void Build_AdditionalHandlerHasNonNullInnerHandler_ThrowsException()
{
diff --git a/src/libraries/Microsoft.Extensions.Http/tests/Microsoft.Extensions.Http.Tests/DependencyInjection/HttpClientFactoryServiceCollectionExtensionsTest.cs b/src/libraries/Microsoft.Extensions.Http/tests/Microsoft.Extensions.Http.Tests/DependencyInjection/HttpClientFactoryServiceCollectionExtensionsTest.cs
index 9aa83a8f34dd0..1b67909daea25 100644
--- a/src/libraries/Microsoft.Extensions.Http/tests/Microsoft.Extensions.Http.Tests/DependencyInjection/HttpClientFactoryServiceCollectionExtensionsTest.cs
+++ b/src/libraries/Microsoft.Extensions.Http/tests/Microsoft.Extensions.Http.Tests/DependencyInjection/HttpClientFactoryServiceCollectionExtensionsTest.cs
@@ -736,7 +736,7 @@ public void AddHttpClient_WithTypedClient_AndName_AndDelegate_ConfiguresNamedCli
Assert.Equal("http://example2.com/", client.HttpClient.BaseAddress.AbsoluteUri);
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void AddHttpMessageHandler_WithName_NewHandlerIsSurroundedByLogging_ForHttpClient()
{
// Arrange
@@ -878,7 +878,7 @@ public void AddHttpClient_WithTypedClientAndImplementation_AndServiceDelegate_Co
Assert.Equal("http://example.com/", client.HttpClient.BaseAddress.AbsoluteUri);
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void AddHttpMessageHandler_WithName_NewHandlerIsSurroundedByLogging_ForHttpMessageHandler()
{
var serviceCollection = new ServiceCollection();
@@ -1185,7 +1185,7 @@ public async Task AddHttpClient_MessageHandler_Scope_TransientDependency()
}
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void AddHttpClient_GetAwaiterAndResult_InSingleThreadedSynchronizationContext_ShouldNotHangs()
{
// Arrange
@@ -1229,7 +1229,7 @@ public void AddHttpClient_GetAwaiterAndResult_InSingleThreadedSynchronizationCon
}
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void SuppressScope_False_CreatesNewScope()
{
// Arrange
@@ -1257,7 +1257,7 @@ public void SuppressScope_False_CreatesNewScope()
Assert.NotSame(services, capturedServices);
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void SuppressScope_False_InScope_CreatesNewScope()
{
// Arrange
@@ -1289,7 +1289,7 @@ public void SuppressScope_False_InScope_CreatesNewScope()
}
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void SuppressScope_True_DoesNotCreateScope()
{
// Arrange
@@ -1317,7 +1317,7 @@ public void SuppressScope_True_DoesNotCreateScope()
Assert.NotSame(services, capturedServices);
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void SuppressScope_True_InScope_DoesNotCreateScope()
{
// Arrange
diff --git a/src/libraries/Microsoft.Extensions.Http/tests/Microsoft.Extensions.Http.Tests/HttpMessageHandlerBuilderTest.cs b/src/libraries/Microsoft.Extensions.Http/tests/Microsoft.Extensions.Http.Tests/HttpMessageHandlerBuilderTest.cs
index 2cc55d2a38e74..cce5d8719a34b 100644
--- a/src/libraries/Microsoft.Extensions.Http/tests/Microsoft.Extensions.Http.Tests/HttpMessageHandlerBuilderTest.cs
+++ b/src/libraries/Microsoft.Extensions.Http/tests/Microsoft.Extensions.Http.Tests/HttpMessageHandlerBuilderTest.cs
@@ -10,7 +10,8 @@ namespace Microsoft.Extensions.Http.Test
{
public class HttpMessageHandlerBuilderTest
{
- [Fact]
+ // Moq heavily utilizes RefEmit, which does not work on most aot workloads
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/50873", TestPlatforms.Android)]
public void Build_AdditionalHandlerIsNull_ThrowsException()
{
@@ -29,7 +30,8 @@ public void Build_AdditionalHandlerIsNull_ThrowsException()
Assert.Equal("The 'additionalHandlers' must not contain a null entry.", exception.Message);
}
- [Fact]
+ // Moq heavily utilizes RefEmit, which does not work on most aot workloads
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/50873", TestPlatforms.Android)]
public void Build_AdditionalHandlerHasNonNullInnerHandler_ThrowsException()
{
diff --git a/src/libraries/Microsoft.Extensions.Logging/tests/Common/LoggerFactoryTest.cs b/src/libraries/Microsoft.Extensions.Logging/tests/Common/LoggerFactoryTest.cs
index e31d7e8c26c13..7c2f39751b903 100644
--- a/src/libraries/Microsoft.Extensions.Logging/tests/Common/LoggerFactoryTest.cs
+++ b/src/libraries/Microsoft.Extensions.Logging/tests/Common/LoggerFactoryTest.cs
@@ -13,7 +13,7 @@ namespace Microsoft.Extensions.Logging.Test
{
public class LoggerFactoryTest
{
- [Fact]
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void AddProvider_ThrowsAfterDisposed()
{
var factory = new LoggerFactory();
@@ -52,7 +52,8 @@ public void Dispose_MultipleCallsNoop()
factory.Dispose();
}
- [Fact]
+ // Moq heavily utilizes RefEmit, which does not work on most aot workloads
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void Dispose_ProvidersAreDisposed()
{
// Arrange
@@ -81,8 +82,8 @@ private static ILoggerProvider CreateProvider()
return disposableProvider.Object;
}
-
- [Fact]
+ // Moq heavily utilizes RefEmit, which does not work on most aot workloads
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void Dispose_ThrowException_SwallowsException()
{
// Arrange
@@ -493,7 +494,8 @@ public void BeginScope_ReturnsCompositeToken_ForMultipleLoggers()
});
}
- [Fact]
+ // Moq heavily utilizes RefEmit, which does not work on most aot workloads
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void CreateDisposeDisposesInnerServiceProvider()
{
var disposed = false;
diff --git a/src/libraries/Microsoft.Extensions.Logging/tests/Common/TraceSourceLoggerTest.cs b/src/libraries/Microsoft.Extensions.Logging/tests/Common/TraceSourceLoggerTest.cs
index 52632e471466c..43019c15c3387 100644
--- a/src/libraries/Microsoft.Extensions.Logging/tests/Common/TraceSourceLoggerTest.cs
+++ b/src/libraries/Microsoft.Extensions.Logging/tests/Common/TraceSourceLoggerTest.cs
@@ -58,7 +58,7 @@ public static void MultipleLoggers_IsEnabledReturnsCorrectValue(SourceLevels fir
Assert.Equal(expected, logger.IsEnabled(LogLevel.Information));
}
- [Theory]
+ [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
[InlineData(true)]
[InlineData(false)]
public static void Log_Shoud_Add_Exception_To_Message_Whether_Formatter_Is_Null_Or_Not(bool shouldFormatterBeNull)
diff --git a/src/libraries/Microsoft.Extensions.Primitives/tests/CompositeChangeTokenTest.cs b/src/libraries/Microsoft.Extensions.Primitives/tests/CompositeChangeTokenTest.cs
index 07bb99b3ffc3f..8b58e0d6b1cb2 100644
--- a/src/libraries/Microsoft.Extensions.Primitives/tests/CompositeChangeTokenTest.cs
+++ b/src/libraries/Microsoft.Extensions.Primitives/tests/CompositeChangeTokenTest.cs
@@ -42,7 +42,8 @@ public void RegisteredCallbacks_AreInvokedExactlyOnce()
Assert.Equal(1, count2);
}
- [Fact]
+ // Moq heavily utilizes RefEmit, which does not work on most aot workloads
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void HasChanged_IsTrue_IfAnyTokenHasChanged()
{
// Arrange
@@ -59,7 +60,8 @@ public void HasChanged_IsTrue_IfAnyTokenHasChanged()
Assert.True(compositeChangeToken.HasChanged);
}
- [Fact]
+ // Moq heavily utilizes RefEmit, which does not work on most aot workloads
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void HasChanged_IsFalse_IfNoTokenHasChanged()
{
// Arrange
@@ -73,7 +75,8 @@ public void HasChanged_IsFalse_IfNoTokenHasChanged()
Assert.False(compositeChangeToken.HasChanged);
}
- [Fact]
+ // Moq heavily utilizes RefEmit, which does not work on most aot workloads
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void ActiveChangeCallbacks_IsTrue_IfAnyTokenHasActiveChangeCallbacks()
{
// Arrange
@@ -89,7 +92,8 @@ public void ActiveChangeCallbacks_IsTrue_IfAnyTokenHasActiveChangeCallbacks()
Assert.True(compositeChangeToken.ActiveChangeCallbacks);
}
- [Fact]
+ // Moq heavily utilizes RefEmit, which does not work on most aot workloads
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public void ActiveChangeCallbacks_IsFalse_IfNoTokenHasActiveChangeCallbacks()
{
// Arrange
diff --git a/src/libraries/Microsoft.NETCore.Platforms/tests/GenerateRuntimeGraphTests.cs b/src/libraries/Microsoft.NETCore.Platforms/tests/GenerateRuntimeGraphTests.cs
index 53bc785e09dee..a5c378d58aeea 100644
--- a/src/libraries/Microsoft.NETCore.Platforms/tests/GenerateRuntimeGraphTests.cs
+++ b/src/libraries/Microsoft.NETCore.Platforms/tests/GenerateRuntimeGraphTests.cs
@@ -1,6 +1,8 @@
// 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.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using Microsoft.Build.Evaluation;
@@ -17,13 +19,23 @@ public class GenerateRuntimeGraphTests
private Log _log;
private TestBuildEngine _engine;
+ private string defaultRootPath = (PlatformDetection.IsiOS || PlatformDetection.IstvOS) ? Path.GetTempPath() : string.Empty;
+ private string defaultRuntimeFile = "runtime.json";
+
public GenerateRuntimeGraphTests(ITestOutputHelper output)
{
_log = new Log(output);
_engine = new TestBuildEngine(_log);
+
+ if (PlatformDetection.IsiOS || PlatformDetection.IstvOS)
+ {
+ var runtimeJsonPath = Path.Combine(defaultRootPath, defaultRuntimeFile);
+ File.Copy(defaultRuntimeFile, runtimeJsonPath, true);
+
+ defaultRuntimeFile = runtimeJsonPath;
+ }
}
- const string DefaultRuntimeFile = "runtime.json";
private static ITaskItem[] DefaultRuntimeGroupItems { get; } = GetDefaultRuntimeGroupItems();
private static ITaskItem[] GetDefaultRuntimeGroupItems()
@@ -56,7 +68,7 @@ public void CanCreateRuntimeGraph()
{
BuildEngine = _engine,
RuntimeGroups = DefaultRuntimeGroupItems,
- RuntimeJson = DefaultRuntimeFile,
+ RuntimeJson = defaultRuntimeFile,
UpdateRuntimeFiles = false
};
task.Execute();
@@ -73,7 +85,7 @@ public void CanIgnoreExistingInferRids()
{
BuildEngine = _engine,
RuntimeGroups = DefaultRuntimeGroupItems,
- RuntimeJson = DefaultRuntimeFile,
+ RuntimeJson = defaultRuntimeFile,
AdditionalRuntimeIdentifiers = new[] { "rhel.9-x64", "centos.9-arm64", "win-x64" },
UpdateRuntimeFiles = false
};
@@ -93,7 +105,7 @@ public void CanIgnoreExistingInferRids()
/// a unique prefix to use for the generated
private void AssertRuntimeGraphAdditions(string[] additionalRIDs, RuntimeDescription[] expectedAdditions, string additionalRIDParent = null, [CallerMemberName] string runtimeFilePrefix = null)
{
- string runtimeFile = runtimeFilePrefix + ".runtime.json";
+ string runtimeFile = Path.Combine(defaultRootPath, runtimeFilePrefix + ".runtime.json");
GenerateRuntimeGraph task = new GenerateRuntimeGraph()
{
@@ -110,12 +122,12 @@ private void AssertRuntimeGraphAdditions(string[] additionalRIDs, RuntimeDescrip
_log.AssertNoErrorsOrWarnings();
RuntimeGraph expected = RuntimeGraph.Merge(
- JsonRuntimeFormat.ReadRuntimeGraph(DefaultRuntimeFile),
+ JsonRuntimeFormat.ReadRuntimeGraph(defaultRuntimeFile),
new RuntimeGraph(expectedAdditions));
RuntimeGraph actual = JsonRuntimeFormat.ReadRuntimeGraph(runtimeFile);
- // Should this assert fail, it's helpful to diff DefaultRuntimeFile and runtimeFile to see the additions.
+ // Should this assert fail, it's helpful to diff defaultRuntimeFile and runtimeFile to see the additions.
Assert.Equal(expected, actual);
}
diff --git a/src/libraries/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/FileIO/FileSystemTests.cs b/src/libraries/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/FileIO/FileSystemTests.cs
index a2f8632f98f39..16406fb3ad24c 100644
--- a/src/libraries/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/FileIO/FileSystemTests.cs
+++ b/src/libraries/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/FileIO/FileSystemTests.cs
@@ -484,6 +484,7 @@ public void GetDirectoryInfo_Directory()
}
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/60586", TestPlatforms.iOS | TestPlatforms.tvOS)]
public void GetDriveInfo_Drive()
{
var Drives = System.IO.DriveInfo.GetDrives();
diff --git a/src/libraries/System.ComponentModel.TypeConverter/tests/CustomTypeDescriptorTests.cs b/src/libraries/System.ComponentModel.TypeConverter/tests/CustomTypeDescriptorTests.cs
index ce8d9c44eed94..80c40e50d2437 100644
--- a/src/libraries/System.ComponentModel.TypeConverter/tests/CustomTypeDescriptorTests.cs
+++ b/src/libraries/System.ComponentModel.TypeConverter/tests/CustomTypeDescriptorTests.cs
@@ -25,7 +25,8 @@ public static IEnumerable
-
+
diff --git a/src/libraries/sendtohelixhelp.proj b/src/libraries/sendtohelixhelp.proj
index 5eda5fb86a2ae..3eac0bacd9245 100644
--- a/src/libraries/sendtohelixhelp.proj
+++ b/src/libraries/sendtohelixhelp.proj
@@ -26,7 +26,8 @@
'$(Scenario)' == 'gcstress0xc_jitstress1' or
'$(Scenario)' == 'gcstress0xc_jitstress2' or
'$(Scenario)' == 'gcstress0xc_jitminopts_heapverify1'">01:30:00
- <_workItemTimeout Condition="'$(_workItemTimeout)' == '' and ('$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'iOSSimulator' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'tvOSSimulator' or '$(TargetOS)' == 'MacCatalyst' or '$(TargetOS)' == 'Android')">00:30:00
+ <_workItemTimeout Condition="'$(_workItemTimeout)' == '' and ('$(TargetOS)' == 'iOSSimulator' or '$(TargetOS)' == 'tvOSSimulator' or '$(TargetOS)' == 'MacCatalyst' or '$(TargetOS)' == 'Android')">00:30:00
+ <_workItemTimeout Condition="'$(_workItemTimeout)' == '' and ('$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'tvOS')">00:45:00
<_workItemTimeout Condition="'$(Scenario)' == '' and '$(_workItemTimeout)' == '' and ('$(TargetArchitecture)' == 'arm64' or '$(TargetArchitecture)' == 'arm')">00:45:00
<_workItemTimeout Condition="'$(Scenario)' != '' and '$(_workItemTimeout)' == '' and ('$(TargetArchitecture)' == 'arm64' or '$(TargetArchitecture)' == 'arm')">01:00:00
<_workItemTimeout Condition="'$(Scenario)' == 'BuildWasmApps' and '$(_workItemTimeout)' == ''">01:30:00
@@ -56,6 +57,10 @@
$(RepositoryEngineeringDir)\testing\scenarios\BuildWasmAppsJobsList.txt
$(WaitForWorkItemCompletion)
+ true
+
+ true
+
$(RepoRoot)src\mono\wasm\emsdk\
true
@@ -87,6 +92,11 @@
+
+
+
+
+
@@ -137,6 +147,13 @@
true
+
+
+ true
+ true
+ true
+
+
$(AppleTestTarget)
+ $(_workItemTimeout)
+ $(_XHarnessAppleCustomCommand)
+
+
+
+
+ $(AppleTestTarget)
+ $(_workItemTimeout)
+ $(_XHarnessAppleCustomCommand)
-
+
+
+ false
+
+ 42
+ $(AppleTestTarget)
+
+
+
+
false
@@ -382,6 +411,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -403,7 +442,7 @@
@@ -470,6 +509,15 @@
+
+ <_TestPath Condition="'%(XHarnessAppBundleToTest.CustomCommands)' != ''">$([System.IO.Path]::GetDirectoryName('%(XHarnessAppBundleToTest.Identity)'))
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -204,6 +243,9 @@
+
+
+
@@ -242,7 +284,9 @@
+
+
@@ -318,37 +362,37 @@
-
-
-
-
-
+
+
-
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ $(NetCoreAppCurrent)
+ false
+ false
+ true
+ link
+ false
+
+
diff --git a/src/mono/msbuild/apple/build/AppleApp.InTree.targets b/src/mono/msbuild/apple/build/AppleApp.InTree.targets
new file mode 100644
index 0000000000000..a26c706971f0e
--- /dev/null
+++ b/src/mono/msbuild/apple/build/AppleApp.InTree.targets
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ <_LocalMicrosoftNetCoreAppRuntimePackDir>$(MicrosoftNetCoreAppRuntimePackDir)
+
+
+
+
+
+
+
+
+
+ $(MSBuildProjectName)
+
+
+ $(TargetOS).AnyCPU.$(Configuration)
+ $([MSBuild]::NormalizeDirectory($(ArtifactsDir), 'helix'))
+ $([MSBuild]::NormalizeDirectory($(HelixArchiveRoot), 'runonly'))
+ $([MSBuild]::NormalizeDirectory($(HelixArchiveRunOnlyRoot), $(OSPlatformConfig), $(WasmHelixTestAppRelativeDir)))
+ $(OutputPath)$(AssemblyName).zip
+
+
+
+
+
diff --git a/src/mono/msbuild/apple/build/AppleApp.LocalBuild.props b/src/mono/msbuild/apple/build/AppleApp.LocalBuild.props
new file mode 100644
index 0000000000000..5d1d76f585da5
--- /dev/null
+++ b/src/mono/msbuild/apple/build/AppleApp.LocalBuild.props
@@ -0,0 +1,73 @@
+
+
+
+
+
+ <_NetCoreAppCurrent>net7.0
+ <_NetCoreAppToolCurrent>net6.0
+ false
+
+
+
+ $(RuntimeSrcDir)\artifacts\bin\
+ $([MSBuild]::NormalizeDirectory($(ArtifactsBinDir), 'microsoft.netcore.app.runtime.$(TargetOS.ToLowerInvariant())-$(TargetArchitecture.ToLowerInvariant())', $(RuntimeConfig)))
+ $([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackLocationToUse), 'runtimes', '$(TargetOS.ToLowerInvariant())-$(TargetArchitecture.ToLowerInvariant())', 'lib', '$(_NetCoreAppCurrent)'))
+ $([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackLocationToUse), 'runtimes', '$(TargetOS.ToLowerInvariant())-$(TargetArchitecture.ToLowerInvariant())', 'native'))
+
+ $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'AppleAppBuilder', 'Debug', '$(_NetCoreAppToolCurrent)'))
+ $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'MonoAOTCompiler', 'Debug', '$(_NetCoreAppToolCurrent)'))
+ $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'MonoTargetsTasks', 'Debug', '$(_NetCoreAppToolCurrent)'))
+
+ $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'mono', '$(TargetOS).$(TargetArchitecture).$(RuntimeConfig)'))
+ $([MSBuild]::NormalizePath($(MonoArtifactsPath), 'cross', '$(TargetOS.ToLowerInvariant())-$(TargetArchitecture.ToLowerInvariant())'))
+ <_MonoAotCrossCompilerPath>$([MSBuild]::NormalizePath($(MonoAotCrossDir), 'mono-aot-cross'))
+ <_MonoAotCrossCompilerPath Condition="$([MSBuild]::IsOSPlatform('WINDOWS'))">$(_MonoAotCrossCompilerPath).exe
+
+
+
+ $(AppleBuildSupportDir)\
+
+ $([MSBuild]::NormalizeDirectory($(BuildBaseDir), 'microsoft.netcore.app.runtime.$(TargetOS.ToLowerInvariant())-$(TargetArchitecture.ToLowerInvariant())'))
+ $([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackLocationToUse), 'runtimes', '$(TargetOS.ToLowerInvariant())-$(TargetArchitecture.ToLowerInvariant())', 'lib', '$(_NetCoreAppCurrent)'))
+ $([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackLocationToUse), 'runtimes', '$(TargetOS.ToLowerInvariant())-$(TargetArchitecture.ToLowerInvariant())', 'native'))
+ $([MSBuild]::NormalizeDirectory($(BuildBaseDir), 'MonoAOTCompiler'))
+ $([MSBuild]::NormalizeDirectory($(BuildBaseDir), 'MonoTargetsTasks'))
+ $([MSBuild]::NormalizeDirectory($(BuildBaseDir), 'AppleAppBuilder'))
+
+ $([MSBuild]::NormalizePath($(BuildBaseDir), 'cross'))
+ <_MonoAotCrossCompilerPath>$([MSBuild]::NormalizePath($(MonoAotCrossDir), 'mono-aot-cross'))
+ <_MonoAotCrossCompilerPath Condition="$([MSBuild]::IsOSPlatform('WINDOWS'))">$(_MonoAotCrossCompilerPath).exe
+
+
+
+
+
+
+
+ $([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackLocationToUse)))
+ $([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackDir), 'runtimes', '$(TargetOS.ToLowerInvariant())-$(TargetArchitecture.ToLowerInvariant())'))
+ $([MSBuild]::NormalizePath('$(AppleAppBuilderDir)', 'AppleAppBuilder.dll'))
+ $([MSBuild]::NormalizePath('$(MonoAOTCompilerDir)', 'MonoAOTCompiler.dll'))
+ $([MSBuild]::NormalizePath('$(MonoTargetsTasksDir)', 'MonoTargetsTasks.dll'))
+
+
+
diff --git a/src/mono/msbuild/apple/build/AppleApp.LocalBuild.targets b/src/mono/msbuild/apple/build/AppleApp.LocalBuild.targets
new file mode 100644
index 0000000000000..524f71be9ff14
--- /dev/null
+++ b/src/mono/msbuild/apple/build/AppleApp.LocalBuild.targets
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+ true
+ link
+
+
+
+ true
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackLocationToUse)))
+ $([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackDir), 'runtimes', '$(TargetOS.ToLowerInvariant())-$(TargetArchitecture.ToLowerInvariant())'))
+ $([MSBuild]::NormalizePath('$(AppleAppBuilderDir)', 'AppleAppBuilder.dll'))
+ $([MSBuild]::NormalizePath('$(MonoAOTCompilerDir)', 'MonoAOTCompiler.dll'))
+ $([MSBuild]::NormalizePath('$(MonoTargetsTasksDir)', 'RuntimeConfigParser.dll'))
+
+
+
+
+
diff --git a/src/mono/msbuild/apple/build/AppleApp.props b/src/mono/msbuild/apple/build/AppleApp.props
new file mode 100644
index 0000000000000..9943c4ee7c2e3
--- /dev/null
+++ b/src/mono/msbuild/apple/build/AppleApp.props
@@ -0,0 +1,19 @@
+
+
+ $(TargetOS.ToLowerInvariant())-$(TargetArchitecture.ToLowerInvariant())
+ true
+ true
+
+
+
+ Publish
+
+ _InitializeCommonProperties;
+ _BeforeAppleBuildApp;
+ _AppleResolveReferences;
+ _AppleAotCompileApp;
+ _AppleGenerateAppBundle;
+ _AfterAppleBuildApp
+
+
+
\ No newline at end of file
diff --git a/src/mono/msbuild/apple/build/AppleApp.targets b/src/mono/msbuild/apple/build/AppleApp.targets
new file mode 100644
index 0000000000000..cb388d01b750b
--- /dev/null
+++ b/src/mono/msbuild/apple/build/AppleApp.targets
@@ -0,0 +1,173 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_MobileIntermediateOutputPath>$([MSBuild]::NormalizeDirectory($(IntermediateOutputPath), 'mobile'))
+
+
+
+
+
+ <_AppleRuntimeConfigFilePath Condition="'$(_AppleRuntimeConfigFilePath)' == ''">$([MSBuild]::NormalizePath($(AppleAppDir), '$(AssemblyName).runtimeconfig.json'))
+ <_ParsedRuntimeConfigFilePath Condition="'$(_ParsedRuntimeConfigFilePath)' == ''">$([MSBuild]::NormalizePath($(AppleAppDir), 'runtimeconfig.bin'))
+
+
+
+
+
+
+
+ <_AppleAssembliesInternal Remove="@(_AppleAssembliesInternal)" />
+ <_AppleAssembliesInternal Include="@(AppleAssembliesToBundle)">
+ <_InternalForceInterpret>%(AppleAssembliesToBundle._InternalForceInterpret)
+ <_IsNative>%(AppleAssembliesToBundle._IsNative)
+
+
+
+
+
+
+
+ <_AOTMode Condition="'$(UseMonoJustInterp)' != 'true'">Full
+ <_AOTMode Condition="'$(UseMonoJustInterp)' == 'true'">JustInterp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ @(MonoAOTCompilerDefaultAotArguments, ';')
+ @(MonoAOTCompilerDefaultProcessArguments, ';')
+
+
+
+ <_AotExcludeAssemblies Include="*System.Runtime.WindowsRuntime.dll" />
+
+
+ <_InternalForceInterpret>%(_AppleAssembliesInternal._InternalForceInterpret)
+ <_IsNative>%(_AppleAssembliesInternal._IsNative)
+
+
+ <_AotInputAssemblies Include="@(_AppleAssembliesInternal)"
+ Condition="'%(_AppleAssembliesInternal._InternalForceInterpret)' != 'true'">
+ $(AotArguments)
+ $(ProcessArguments)
+
+
+ <_AOT_InternalForceInterpretAssemblies Include="@(_AppleAssembliesInternal->WithMetadataValue('_InternalForceInterpret', 'true'))" />
+ <_AppleAssembliesInternal Remove="@(_AppleAssembliesInternal)" />
+
+
+
+
+
+
+
+
+
+
+
+ <_AppleAssembliesInternal Include="@(_AOT_InternalForceInterpretAssemblies)" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_RuntimeConfigReservedProperties Include="RUNTIME_IDENTIFIER"/>
+ <_RuntimeConfigReservedProperties Include="APP_CONTEXT_BASE_DIRECTORY"/>
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/mono/msbuild/apple/data/Directory.Build.props b/src/mono/msbuild/apple/data/Directory.Build.props
new file mode 100644
index 0000000000000..51a42316d05ee
--- /dev/null
+++ b/src/mono/msbuild/apple/data/Directory.Build.props
@@ -0,0 +1,16 @@
+
+
+ $(HELIX_CORRELATION_PAYLOAD)\build\
+ <_AppleTargetsDir>$(AppleBuildSupportDir)\apple\
+
+
+
+ <_AppleTargetsDir Condition="'$(_AppleTargetsDir)' == '' and '$(RuntimeSrcDir)' != ''">$(RuntimeSrcDir)\src\mono\msbuild\apple\build\
+ <_AppleTargetsDir Condition="'$(_AppleTargetsDir)' != ''">$([MSBuild]::EnsureTrailingSlash($(_AppleTargetsDir)))
+
+
+
+
+ PrepareForAppleBuild;$(AppleBuildAppDependsOn)
+
+
diff --git a/src/mono/msbuild/apple/data/Directory.Build.targets b/src/mono/msbuild/apple/data/Directory.Build.targets
new file mode 100644
index 0000000000000..1cf9e918b3702
--- /dev/null
+++ b/src/mono/msbuild/apple/data/Directory.Build.targets
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/mono/msbuild/apple/data/ProxyProjectForAOTOnHelix.proj b/src/mono/msbuild/apple/data/ProxyProjectForAOTOnHelix.proj
new file mode 100644
index 0000000000000..658cde62ce6c5
--- /dev/null
+++ b/src/mono/msbuild/apple/data/ProxyProjectForAOTOnHelix.proj
@@ -0,0 +1,77 @@
+
+
+
+ $(HELIX_WORKITEM_ROOT)\apple_build\
+ $(MSBuildThisFileDirectory)..\apple_build\
+
+ true
+ $(TestRootDir)..\publish\
+ $(OriginalPublishDir)..\extraFiles\
+ $(TestRootDir)\obj\
+
+ _PrepareForAppleBuildAppOnHelix;$(AppleBuildAppDependsOn);_AfterAppleBuildAppOnHelix
+
+ <_PropsFile>$(MSBuildThisFileDirectory)$(MSBuildThisFileName).props
+
+
+
+
+
+
+
+
+
+
+ $(OriginalPublishDir)
+ $(TestRootDir)AppBundle\
+
+ $(OriginalPublishDir)AppleTestRunner.dll
+ true
+
+
+
+
+
+
+
+ <_ExtraFiles Include="$(ExtraFilesPath)**\*" />
+
+
+
+
+
+
+
+
+
+ <_RuntimePackFiles Condition="%(_AppleUsedRuntimePackFiles.Extension) == '.dll' and %(_AppleUsedRuntimePackFiles.FileName) != 'System.Private.CoreLib'" Include="@(_AppleUsedRuntimePackFiles->'$(MicrosoftNetCoreAppRuntimePackLibDir)%(FileName)%(Extension)')" />
+ <_RuntimePackFiles Condition="%(_AppleUsedRuntimePackFiles.Extension) != '.dll' or %(_AppleUsedRuntimePackFiles.FileName) == 'System.Private.CoreLib'" Include="@(_AppleUsedRuntimePackFiles->'$(MicrosoftNetCoreAppRuntimePackNativeDir)%(FileName)%(Extension)')" />
+
+
+
+
+
+
+
+
+ <_TestProjectName>$([System.IO.Path]::GetFileName('$(AppBundlePath)'))
+ <_XHarnessAppPath>$([MSBuild]::NormalizeDirectory($(XHARNESS_EXECUTION_DIR), $(_TestProjectName)))
+
+
+ <_AppBundleFiles Include="$(AppBundlePath)\**\*" />
+ <_AppBundleFiles Include="$(XHARNESS_EXECUTION_DIR)\*.mobileprovision" />
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/tasks/AppleAppBuilder/Templates/runtime.m b/src/tasks/AppleAppBuilder/Templates/runtime.m
index b885afb56db27..5a76abd589195 100644
--- a/src/tasks/AppleAppBuilder/Templates/runtime.m
+++ b/src/tasks/AppleAppBuilder/Templates/runtime.m
@@ -330,6 +330,8 @@
mono_jit_set_aot_mode (MONO_AOT_MODE_INTERP);
#else
mono_jit_set_aot_mode (MONO_AOT_MODE_FULL);
+ // it's for PlatformDetection.IsMonoAOT on iOS/tvOS
+ setenv ("MONO_AOT_MODE", "aot", TRUE);
#endif
#endif