diff --git a/Directory.Build.props b/Directory.Build.props
index 291e3b4f05..f9fbe947c4 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -26,12 +26,15 @@
net462
+ net9.0
+
+
uap10.0.16299
+ net9.0-windows10.0.17763.0
net6.0-windows10.0.18362.0
- net8.0
- netcoreapp3.1;net6.0;net7.0;net8.0
- net6.0;net7.0;net8.0
+ net6.0;net7.0;net8.0;net9.0
+ netcoreapp3.1;net6.0;net7.0;net8.0;net9.0
diff --git a/eng/verify-nupkgs.ps1 b/eng/verify-nupkgs.ps1
index d119680355..b53082e743 100644
--- a/eng/verify-nupkgs.ps1
+++ b/eng/verify-nupkgs.ps1
@@ -21,8 +21,8 @@ function Confirm-NugetPackages {
$expectedNumOfFiles = @{
"MSTest.Sdk" = 15;
"MSTest.Internal.TestFx.Documentation" = 10;
- "MSTest.TestFramework" = 130;
- "MSTest.TestAdapter" = 76;
+ "MSTest.TestFramework" = 150;
+ "MSTest.TestAdapter" = 84;
"MSTest" = 6;
"MSTest.Analyzers" = 10;
}
diff --git a/samples/public/BlankUwpNet9App/App.xaml b/samples/public/BlankUwpNet9App/App.xaml
new file mode 100644
index 0000000000..dfc0b61956
--- /dev/null
+++ b/samples/public/BlankUwpNet9App/App.xaml
@@ -0,0 +1,5 @@
+
diff --git a/samples/public/BlankUwpNet9App/App.xaml.cs b/samples/public/BlankUwpNet9App/App.xaml.cs
new file mode 100644
index 0000000000..3e553d11ec
--- /dev/null
+++ b/samples/public/BlankUwpNet9App/App.xaml.cs
@@ -0,0 +1,103 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Microsoft.VisualStudio.TestTools.UnitTesting.AppContainer;
+
+using Windows.ApplicationModel;
+using Windows.ApplicationModel.Activation;
+using Windows.Foundation;
+using Windows.Foundation.Collections;
+using Windows.UI.Xaml;
+using Windows.UI.Xaml.Controls;
+using Windows.UI.Xaml.Controls.Primitives;
+using Windows.UI.Xaml.Data;
+using Windows.UI.Xaml.Input;
+using Windows.UI.Xaml.Media;
+using Windows.UI.Xaml.Navigation;
+
+namespace BlankUwpNet9App
+{
+ ///
+ /// Provides application-specific behavior to supplement the default Application class.
+ ///
+ sealed partial class App : Application
+ {
+ ///
+ /// Initializes the singleton application object. This is the first line of authored code
+ /// executed, and as such is the logical equivalent of main() or WinMain().
+ ///
+ public App()
+ {
+ InitializeComponent();
+
+ Suspending += OnSuspending;
+ }
+
+ ///
+ protected override void OnLaunched(LaunchActivatedEventArgs e)
+ {
+ Frame rootFrame = Window.Current.Content as Frame;
+
+ // Do not repeat app initialization when the Window already has content,
+ // just ensure that the window is active.
+ if (rootFrame == null)
+ {
+ // Create a Frame to act as the navigation context and navigate to the first page
+ rootFrame = new Frame();
+ rootFrame.NavigationFailed += OnNavigationFailed;
+
+ if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
+ {
+ // TODO: Load state from previously suspended application
+ }
+
+ // Place the frame in the current Window
+ Window.Current.Content = rootFrame;
+ }
+
+ Microsoft.VisualStudio.TestPlatform.TestExecutor.UnitTestClient.CreateDefaultUI();
+
+ //if (e.PrelaunchActivated == false)
+ //{
+ // if (rootFrame.Content == null)
+ // {
+ // // When the navigation stack isn't restored navigate to the first page, configuring
+ // // the new page by passing required information as a navigation parameter.
+ // rootFrame.Navigate(typeof(MainPage), e.Arguments);
+ // }
+
+ // Ensure the current window is active
+ Window.Current.Activate();
+ //}
+
+ Microsoft.VisualStudio.TestPlatform.TestExecutor.UnitTestClient.Run(e.Arguments);
+ }
+
+ ///
+ /// Invoked when Navigation to a certain page fails.
+ ///
+ /// The Frame which failed navigation.
+ /// Details about the navigation failure.
+ void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
+ {
+ throw new Exception($"Failed to load page '{e.SourcePageType.FullName}'.");
+ }
+
+ ///
+ /// Invoked when application execution is being suspended. Application state is saved
+ /// without knowing whether the application will be terminated or resumed with the contents
+ /// of memory still intact.
+ ///
+ /// The source of the suspend request.
+ /// Details about the suspend request.
+ private void OnSuspending(object sender, SuspendingEventArgs e)
+ {
+ SuspendingDeferral deferral = e.SuspendingOperation.GetDeferral();
+
+ // TODO: Save application state and stop any background activity
+ deferral.Complete();
+ }
+ }
+}
diff --git a/samples/public/BlankUwpNet9App/Assets/LockScreenLogo.scale-200.png b/samples/public/BlankUwpNet9App/Assets/LockScreenLogo.scale-200.png
new file mode 100644
index 0000000000..735f57adb5
Binary files /dev/null and b/samples/public/BlankUwpNet9App/Assets/LockScreenLogo.scale-200.png differ
diff --git a/samples/public/BlankUwpNet9App/Assets/SplashScreen.scale-200.png b/samples/public/BlankUwpNet9App/Assets/SplashScreen.scale-200.png
new file mode 100644
index 0000000000..023e7f1fed
Binary files /dev/null and b/samples/public/BlankUwpNet9App/Assets/SplashScreen.scale-200.png differ
diff --git a/samples/public/BlankUwpNet9App/Assets/Square150x150Logo.scale-200.png b/samples/public/BlankUwpNet9App/Assets/Square150x150Logo.scale-200.png
new file mode 100644
index 0000000000..af49fec1a5
Binary files /dev/null and b/samples/public/BlankUwpNet9App/Assets/Square150x150Logo.scale-200.png differ
diff --git a/samples/public/BlankUwpNet9App/Assets/Square44x44Logo.scale-200.png b/samples/public/BlankUwpNet9App/Assets/Square44x44Logo.scale-200.png
new file mode 100644
index 0000000000..ce342a2ec8
Binary files /dev/null and b/samples/public/BlankUwpNet9App/Assets/Square44x44Logo.scale-200.png differ
diff --git a/samples/public/BlankUwpNet9App/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/samples/public/BlankUwpNet9App/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
new file mode 100644
index 0000000000..f6c02ce97e
Binary files /dev/null and b/samples/public/BlankUwpNet9App/Assets/Square44x44Logo.targetsize-24_altform-unplated.png differ
diff --git a/samples/public/BlankUwpNet9App/Assets/StoreLogo.png b/samples/public/BlankUwpNet9App/Assets/StoreLogo.png
new file mode 100644
index 0000000000..7385b56c0e
Binary files /dev/null and b/samples/public/BlankUwpNet9App/Assets/StoreLogo.png differ
diff --git a/samples/public/BlankUwpNet9App/Assets/Wide310x150Logo.scale-200.png b/samples/public/BlankUwpNet9App/Assets/Wide310x150Logo.scale-200.png
new file mode 100644
index 0000000000..288995b397
Binary files /dev/null and b/samples/public/BlankUwpNet9App/Assets/Wide310x150Logo.scale-200.png differ
diff --git a/samples/public/BlankUwpNet9App/BlankUwpNet9App.csproj b/samples/public/BlankUwpNet9App/BlankUwpNet9App.csproj
new file mode 100644
index 0000000000..4679717d97
--- /dev/null
+++ b/samples/public/BlankUwpNet9App/BlankUwpNet9App.csproj
@@ -0,0 +1,36 @@
+
+
+ WinExe
+ net9.0-windows10.0.26100.0
+ 10.0.17763.0
+ 10.0.26100.57
+ x86;x64;arm64
+ win-x86;win-x64;win-arm64
+ win-$(Platform).pubxml
+ en-US
+ true
+ true
+ true
+ true
+ $(VisualStudioVersion)
+
+
+ 1.0.20241009.2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/public/BlankUwpNet9App/BlankUwpNet9App.sln b/samples/public/BlankUwpNet9App/BlankUwpNet9App.sln
new file mode 100644
index 0000000000..51579fbc9e
--- /dev/null
+++ b/samples/public/BlankUwpNet9App/BlankUwpNet9App.sln
@@ -0,0 +1,40 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.12.35521.163 d17.12
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlankUwpNet9App", "BlankUwpNet9App.csproj", "{D9E66319-BE72-4384-93FC-CA0C1B79C7FC}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|arm64 = Debug|arm64
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|arm64 = Release|arm64
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {D9E66319-BE72-4384-93FC-CA0C1B79C7FC}.Debug|arm64.ActiveCfg = Debug|arm64
+ {D9E66319-BE72-4384-93FC-CA0C1B79C7FC}.Debug|arm64.Build.0 = Debug|arm64
+ {D9E66319-BE72-4384-93FC-CA0C1B79C7FC}.Debug|arm64.Deploy.0 = Debug|arm64
+ {D9E66319-BE72-4384-93FC-CA0C1B79C7FC}.Debug|x64.ActiveCfg = Debug|x64
+ {D9E66319-BE72-4384-93FC-CA0C1B79C7FC}.Debug|x64.Build.0 = Debug|x64
+ {D9E66319-BE72-4384-93FC-CA0C1B79C7FC}.Debug|x64.Deploy.0 = Debug|x64
+ {D9E66319-BE72-4384-93FC-CA0C1B79C7FC}.Debug|x86.ActiveCfg = Debug|x86
+ {D9E66319-BE72-4384-93FC-CA0C1B79C7FC}.Debug|x86.Build.0 = Debug|x86
+ {D9E66319-BE72-4384-93FC-CA0C1B79C7FC}.Debug|x86.Deploy.0 = Debug|x86
+ {D9E66319-BE72-4384-93FC-CA0C1B79C7FC}.Release|arm64.ActiveCfg = Release|arm64
+ {D9E66319-BE72-4384-93FC-CA0C1B79C7FC}.Release|arm64.Build.0 = Release|arm64
+ {D9E66319-BE72-4384-93FC-CA0C1B79C7FC}.Debug|arm64.Deploy.0 = Release|arm64
+ {D9E66319-BE72-4384-93FC-CA0C1B79C7FC}.Release|x64.ActiveCfg = Release|x64
+ {D9E66319-BE72-4384-93FC-CA0C1B79C7FC}.Release|x64.Build.0 = Release|x64
+ {D9E66319-BE72-4384-93FC-CA0C1B79C7FC}.Debug|x64.Deploy.0 = Release|x64
+ {D9E66319-BE72-4384-93FC-CA0C1B79C7FC}.Release|x86.ActiveCfg = Release|x86
+ {D9E66319-BE72-4384-93FC-CA0C1B79C7FC}.Release|x86.Build.0 = Release|x86
+ {D9E66319-BE72-4384-93FC-CA0C1B79C7FC}.Debug|x86.Deploy.0 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/samples/public/BlankUwpNet9App/MainPage.xaml b/samples/public/BlankUwpNet9App/MainPage.xaml
new file mode 100644
index 0000000000..16d586339d
--- /dev/null
+++ b/samples/public/BlankUwpNet9App/MainPage.xaml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
diff --git a/samples/public/BlankUwpNet9App/MainPage.xaml.cs b/samples/public/BlankUwpNet9App/MainPage.xaml.cs
new file mode 100644
index 0000000000..969d14d689
--- /dev/null
+++ b/samples/public/BlankUwpNet9App/MainPage.xaml.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices.WindowsRuntime;
+using Windows.Foundation;
+using Windows.Foundation.Collections;
+using Windows.UI.Xaml;
+using Windows.UI.Xaml.Controls;
+using Windows.UI.Xaml.Controls.Primitives;
+using Windows.UI.Xaml.Data;
+using Windows.UI.Xaml.Input;
+using Windows.UI.Xaml.Media;
+using Windows.UI.Xaml.Navigation;
+
+// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409
+
+namespace BlankUwpNet9App
+{
+ ///
+ /// An empty page that can be used on its own or navigated to within a Frame.
+ ///
+ public sealed partial class MainPage : Page
+ {
+ public MainPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/samples/public/BlankUwpNet9App/Package.appxmanifest b/samples/public/BlankUwpNet9App/Package.appxmanifest
new file mode 100644
index 0000000000..c0e8a4176c
--- /dev/null
+++ b/samples/public/BlankUwpNet9App/Package.appxmanifest
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+ BlankUwpNet9App
+ sergiopedri
+ Assets\StoreLogo.png
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/public/BlankUwpNet9App/Properties/PublishProfiles/win-arm64.pubxml b/samples/public/BlankUwpNet9App/Properties/PublishProfiles/win-arm64.pubxml
new file mode 100644
index 0000000000..eeb8cf16ff
--- /dev/null
+++ b/samples/public/BlankUwpNet9App/Properties/PublishProfiles/win-arm64.pubxml
@@ -0,0 +1,14 @@
+
+
+
+
+ FileSystem
+ ARM64
+ win-arm64
+ bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\
+ true
+ true
+
+
\ No newline at end of file
diff --git a/samples/public/BlankUwpNet9App/Properties/PublishProfiles/win-x64.pubxml b/samples/public/BlankUwpNet9App/Properties/PublishProfiles/win-x64.pubxml
new file mode 100644
index 0000000000..cda40ef369
--- /dev/null
+++ b/samples/public/BlankUwpNet9App/Properties/PublishProfiles/win-x64.pubxml
@@ -0,0 +1,14 @@
+
+
+
+
+ FileSystem
+ x64
+ win-x64
+ bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\
+ true
+ true
+
+
\ No newline at end of file
diff --git a/samples/public/BlankUwpNet9App/Properties/PublishProfiles/win-x86.pubxml b/samples/public/BlankUwpNet9App/Properties/PublishProfiles/win-x86.pubxml
new file mode 100644
index 0000000000..3293f82cb0
--- /dev/null
+++ b/samples/public/BlankUwpNet9App/Properties/PublishProfiles/win-x86.pubxml
@@ -0,0 +1,14 @@
+
+
+
+
+ FileSystem
+ x86
+ win-x86
+ bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\
+ true
+ true
+
+
\ No newline at end of file
diff --git a/samples/public/BlankUwpNet9App/Properties/launchSettings.json b/samples/public/BlankUwpNet9App/Properties/launchSettings.json
new file mode 100644
index 0000000000..8c4e9787e3
--- /dev/null
+++ b/samples/public/BlankUwpNet9App/Properties/launchSettings.json
@@ -0,0 +1,7 @@
+{
+ "profiles": {
+ "BlankUwpNet9App": {
+ "commandName": "MsixPackage"
+ }
+ }
+}
\ No newline at end of file
diff --git a/samples/public/BlankUwpNet9App/UnitTests.cs b/samples/public/BlankUwpNet9App/UnitTests.cs
new file mode 100644
index 0000000000..53b992a36c
--- /dev/null
+++ b/samples/public/BlankUwpNet9App/UnitTests.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Microsoft.VisualStudio.TestTools.UnitTesting.AppContainer;
+
+using Windows.UI.Xaml.Controls;
+
+namespace App1
+{
+ [TestClass]
+ public class UnitTest1
+ {
+ [TestMethod]
+ public void TestMethod1()
+ {
+ Assert.AreEqual(0, 0);
+ }
+
+ // Use the UITestMethod attribute for tests that need to run on the UI thread.
+ [UITestMethod]
+ public void TestMethod2()
+ {
+ var grid = new Grid();
+ Assert.AreEqual(0, grid.MinWidth);
+ }
+ }
+}
diff --git a/src/Adapter/MSTest.TestAdapter/DynamicDataOperations.cs b/src/Adapter/MSTest.TestAdapter/DynamicDataOperations.cs
index a666067292..2bd1846fdd 100644
--- a/src/Adapter/MSTest.TestAdapter/DynamicDataOperations.cs
+++ b/src/Adapter/MSTest.TestAdapter/DynamicDataOperations.cs
@@ -3,7 +3,7 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
-#if NET471_OR_GREATER || NETCOREAPP
+#if NET471_OR_GREATER || (NET && !WINDOWS_UWP)
using System.Collections;
using System.Runtime.CompilerServices;
#endif
@@ -129,7 +129,7 @@ private static bool TryGetData(object dataSource, [NotNullWhen(true)] out IEnume
return true;
}
-#if NETCOREAPP || NET471_OR_GREATER
+#if NET471_OR_GREATER || (NET && !WINDOWS_UWP)
if (dataSource is IEnumerable enumerable)
{
List