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 objects = new(); diff --git a/src/Adapter/MSTest.TestAdapter/MSTest.TestAdapter.csproj b/src/Adapter/MSTest.TestAdapter/MSTest.TestAdapter.csproj index fb25147250..f932870568 100644 --- a/src/Adapter/MSTest.TestAdapter/MSTest.TestAdapter.csproj +++ b/src/Adapter/MSTest.TestAdapter/MSTest.TestAdapter.csproj @@ -5,7 +5,7 @@ - netstandard2.0;$(NetFrameworkMinimum);$(SupportedNetFrameworks);$(UwpMinimum);$(WinUiMinimum) + netstandard2.0;$(NetFrameworkMinimum);$(SupportedNetFrameworks);$(UwpMinimum);$(ModernUwpMinimum);$(WinUiMinimum) $(SupportedNetFrameworks);netstandard2.0 true @@ -33,6 +33,7 @@ - .NET 6.0 - .NET 6.0 Windows.18362+ - UWP 10.0.16299 + - UWP 10.0.17763 with .NET 9 $(NoWarn);NU5127;NU5128 @@ -46,6 +47,11 @@ true + + + $(DefineConstants);WINDOWS_UWP + + @@ -53,16 +59,17 @@ - + - - - - + + + + True True @@ -85,16 +92,16 @@ - + PreserveNewest PreserveNewest - + PreserveNewest - + PreserveNewest diff --git a/src/Adapter/MSTest.TestAdapter/MSTest.TestAdapter.nuspec b/src/Adapter/MSTest.TestAdapter/MSTest.TestAdapter.nuspec index dcb1207828..2164c734c3 100644 --- a/src/Adapter/MSTest.TestAdapter/MSTest.TestAdapter.nuspec +++ b/src/Adapter/MSTest.TestAdapter/MSTest.TestAdapter.nuspec @@ -32,6 +32,10 @@ + + + + PACKAGE.md @@ -50,7 +54,7 @@ - + @@ -67,7 +71,7 @@ - + @@ -88,6 +92,16 @@ + + + + + + + + + + diff --git a/src/Adapter/MSTest.TestAdapter/PACKAGE.md b/src/Adapter/MSTest.TestAdapter/PACKAGE.md index 49347b92da..ed63b63c2d 100644 --- a/src/Adapter/MSTest.TestAdapter/PACKAGE.md +++ b/src/Adapter/MSTest.TestAdapter/PACKAGE.md @@ -11,3 +11,4 @@ Supported platforms: - .NET 6.0+ - .NET 6.0 Windows.18362+ - UWP 10.0.16299 +- UWP 10.0.17763 with .NET 9 \ No newline at end of file diff --git a/src/Adapter/MSTest.TestAdapter/PublicAPI/uap10.0.16299/PublicAPI.Shipped.txt b/src/Adapter/MSTest.TestAdapter/PublicAPI/uwp/PublicAPI.Shipped.txt similarity index 100% rename from src/Adapter/MSTest.TestAdapter/PublicAPI/uap10.0.16299/PublicAPI.Shipped.txt rename to src/Adapter/MSTest.TestAdapter/PublicAPI/uwp/PublicAPI.Shipped.txt diff --git a/src/Adapter/MSTest.TestAdapter/PublicAPI/uap10.0.16299/PublicAPI.Unshipped.txt b/src/Adapter/MSTest.TestAdapter/PublicAPI/uwp/PublicAPI.Unshipped.txt similarity index 100% rename from src/Adapter/MSTest.TestAdapter/PublicAPI/uap10.0.16299/PublicAPI.Unshipped.txt rename to src/Adapter/MSTest.TestAdapter/PublicAPI/uwp/PublicAPI.Unshipped.txt diff --git a/src/Adapter/MSTest.TestAdapter/build/net/MSTest.TestAdapter.targets b/src/Adapter/MSTest.TestAdapter/build/net/MSTest.TestAdapter.targets index f3ef87d399..bd4f29e08c 100644 --- a/src/Adapter/MSTest.TestAdapter/build/net/MSTest.TestAdapter.targets +++ b/src/Adapter/MSTest.TestAdapter/build/net/MSTest.TestAdapter.targets @@ -9,10 +9,13 @@ - <__TestAdapterPlatformServicesRoot>$(MSBuildThisFileDirectory)../net6.0/winui/ + <_TestAdapterPlatformServicesRoot>$(MSBuildThisFileDirectory)../net6.0/winui/ - - <__TestAdapterPlatformServicesRoot>$(MSBuildThisFileDirectory) + + <_TestAdapterPlatformServicesRoot>$(MSBuildThisFileDirectory)../net9.0/uwp/ + + + <_TestAdapterPlatformServicesRoot>$(MSBuildThisFileDirectory) @@ -21,7 +24,7 @@ PreserveNewest False - + Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll PreserveNewest False @@ -48,7 +51,7 @@ - $(__TestAdapterPlatformServicesRoot)Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll + $(_TestAdapterPlatformServicesRoot)Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll diff --git a/src/Adapter/MSTestAdapter.PlatformServices/AssemblyResolver.cs b/src/Adapter/MSTestAdapter.PlatformServices/AssemblyResolver.cs index 59ae87d210..2a397652d4 100644 --- a/src/Adapter/MSTestAdapter.PlatformServices/AssemblyResolver.cs +++ b/src/Adapter/MSTestAdapter.PlatformServices/AssemblyResolver.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -#if NETFRAMEWORK || NET +#if NETFRAMEWORK || (NET && !WINDOWS_UWP) using System.Diagnostics; using System.Reflection; #if NETFRAMEWORK diff --git a/src/Adapter/MSTestAdapter.PlatformServices/MSTestAdapter.PlatformServices.csproj b/src/Adapter/MSTestAdapter.PlatformServices/MSTestAdapter.PlatformServices.csproj index 7752d8d63a..a015059625 100644 --- a/src/Adapter/MSTestAdapter.PlatformServices/MSTestAdapter.PlatformServices.csproj +++ b/src/Adapter/MSTestAdapter.PlatformServices/MSTestAdapter.PlatformServices.csproj @@ -5,7 +5,7 @@ - netstandard2.0;$(NetFrameworkMinimum);$(SupportedNetFrameworks);$(UwpMinimum);$(WinUiMinimum) + netstandard2.0;$(NetFrameworkMinimum);$(SupportedNetFrameworks);$(UwpMinimum);$(ModernUwpMinimum);$(WinUiMinimum) $(SupportedNetFrameworks);netstandard2.0 true @@ -17,8 +17,8 @@ - - $(DefineConstants);NETFX_CORE;WINDOWS_UWP + + $(DefineConstants);WINDOWS_UWP @@ -47,7 +47,7 @@ - + @@ -61,7 +61,7 @@ - + True True diff --git a/src/Adapter/MSTestAdapter.PlatformServices/PublicAPI/net9.0-windows10.0.17763.0/PublicAPI.Shipped.txt b/src/Adapter/MSTestAdapter.PlatformServices/PublicAPI/net9.0-windows10.0.17763.0/PublicAPI.Shipped.txt new file mode 100644 index 0000000000..0f2adb28da --- /dev/null +++ b/src/Adapter/MSTestAdapter.PlatformServices/PublicAPI/net9.0-windows10.0.17763.0/PublicAPI.Shipped.txt @@ -0,0 +1,4 @@ +#nullable enable +Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.TraceListenerManager.Close(Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.ITraceListener! traceListener) -> void +Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.TraceListenerWrapper.Close() -> void +Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.TraceListenerWrapper.Dispose() -> void \ No newline at end of file diff --git a/src/Adapter/MSTestAdapter.PlatformServices/PublicAPI/net9.0-windows10.0.17763.0/PublicAPI.Unshipped.txt b/src/Adapter/MSTestAdapter.PlatformServices/PublicAPI/net9.0-windows10.0.17763.0/PublicAPI.Unshipped.txt new file mode 100644 index 0000000000..815c92006a --- /dev/null +++ b/src/Adapter/MSTestAdapter.PlatformServices/PublicAPI/net9.0-windows10.0.17763.0/PublicAPI.Unshipped.txt @@ -0,0 +1 @@ +#nullable enable \ No newline at end of file diff --git a/src/Adapter/MSTestAdapter.PlatformServices/Services/FileOperations.cs b/src/Adapter/MSTestAdapter.PlatformServices/Services/FileOperations.cs index 82064d7c5b..e1c08642e2 100644 --- a/src/Adapter/MSTestAdapter.PlatformServices/Services/FileOperations.cs +++ b/src/Adapter/MSTestAdapter.PlatformServices/Services/FileOperations.cs @@ -82,13 +82,13 @@ public Assembly LoadAssembly(string assemblyName, bool isReflectionOnly) /// The assembly. /// Path to the .DLL of the assembly. public string? GetAssemblyPath(Assembly assembly) -#if NETSTANDARD || NETCOREAPP || NETFRAMEWORK +#if WINDOWS_UWP + => null; // TODO: what are the options here? +#else // This method will never be called in source generator mode, we are providing a different provider for file operations. #pragma warning disable IL3000 // Avoid accessing Assembly file path when publishing as a single file => assembly.Location; #pragma warning disable IL3000 // Avoid accessing Assembly file path when publishing as a single file -#elif WINDOWS_UWP - => null; // TODO: what are the options here? #endif /// @@ -99,13 +99,7 @@ public Assembly LoadAssembly(string assemblyName, bool isReflectionOnly) /// This is currently not implemented. public bool DoesFileExist(string assemblyFileName) { -#if NETSTANDARD || (NETCOREAPP && !WIN_UI) - // For projectK these assemblies can be created on the fly which means the file might not exist on disk. - // Depend on Assembly Load failures instead of this validation. - return true; -#elif NETFRAMEWORK - return (SafeInvoke(() => File.Exists(assemblyFileName)) as bool?) ?? false; -#elif WINDOWS_UWP +#if WINDOWS_UWP bool fileExists = false; try @@ -121,6 +115,12 @@ public bool DoesFileExist(string assemblyFileName) } return fileExists; +#elif NETSTANDARD || (NETCOREAPP && !WIN_UI) + // For projectK these assemblies can be created on the fly which means the file might not exist on disk. + // Depend on Assembly Load failures instead of this validation. + return true; +#elif NETFRAMEWORK + return (SafeInvoke(() => File.Exists(assemblyFileName)) as bool?) ?? false; #elif WIN_UI string path = GetFullFilePath(assemblyFileName); return File.Exists(path); diff --git a/src/Adapter/MSTestAdapter.PlatformServices/Services/TestSourceHost.cs b/src/Adapter/MSTestAdapter.PlatformServices/Services/TestSourceHost.cs index 482c4f9b94..2adae07e6e 100644 --- a/src/Adapter/MSTestAdapter.PlatformServices/Services/TestSourceHost.cs +++ b/src/Adapter/MSTestAdapter.PlatformServices/Services/TestSourceHost.cs @@ -11,7 +11,7 @@ using Microsoft.VisualStudio.TestPlatform.ObjectModel; #endif using Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter; -#if NETFRAMEWORK || NET +#if NETFRAMEWORK || (NET && !WINDOWS_UWP) using Microsoft.VisualStudio.TestPlatform.ObjectModel.Utilities; #endif #if !WINDOWS_UWP @@ -32,7 +32,7 @@ public class TestSourceHost : ITestSourceHost private string? _currentDirectory; #endif -#if NETFRAMEWORK || NET +#if NETFRAMEWORK || (NET && !WINDOWS_UWP) /// /// Assembly resolver used in the current app-domain. /// @@ -104,7 +104,7 @@ internal TestSourceHost(string sourceFileName, IRunSettings? runSettings, IFrame /// public void SetupHost() { -#if NET +#if NET && !WINDOWS_UWP List resolutionPaths = GetResolutionPaths(_sourceFileName, false); if (EqtTrace.IsInfoEnabled) @@ -209,7 +209,7 @@ public void SetupHost() /// public void Dispose() { -#if NETFRAMEWORK || NET +#if NETFRAMEWORK || (NET && !WINDOWS_UWP) if (_parentDomainAssemblyResolver != null) { _parentDomainAssemblyResolver.Dispose(); @@ -347,7 +347,7 @@ internal virtual string GetTargetFrameworkVersionString(string sourceFileName) => new DeploymentUtility().GetConfigFile(sourceFileName); #endif -#if NETFRAMEWORK || NET +#if NETFRAMEWORK || (NET && !WINDOWS_UWP) /// /// Gets the probing paths to load the test assembly dependencies. /// diff --git a/src/Package/MSTest.Internal.TestFx.Documentation/MSTest.Internal.TestFx.Documentation.nuspec b/src/Package/MSTest.Internal.TestFx.Documentation/MSTest.Internal.TestFx.Documentation.nuspec index dce6465353..11bd925e83 100644 --- a/src/Package/MSTest.Internal.TestFx.Documentation/MSTest.Internal.TestFx.Documentation.nuspec +++ b/src/Package/MSTest.Internal.TestFx.Documentation/MSTest.Internal.TestFx.Documentation.nuspec @@ -13,6 +13,6 @@ - + diff --git a/src/Package/MSTest.Sdk/PACKAGE.md b/src/Package/MSTest.Sdk/PACKAGE.md index 7a64c625b3..f09f7b9069 100644 --- a/src/Package/MSTest.Sdk/PACKAGE.md +++ b/src/Package/MSTest.Sdk/PACKAGE.md @@ -11,3 +11,4 @@ Supported platforms: - .NET 6.0+ - .NET 6.0 Windows.18362+ - UWP 10.0.16299 +- UWP 10.0.17763 with .NET 9 \ No newline at end of file diff --git a/src/Package/MSTest/MSTest.csproj b/src/Package/MSTest/MSTest.csproj index 05b34847f1..b4f98f8314 100644 --- a/src/Package/MSTest/MSTest.csproj +++ b/src/Package/MSTest/MSTest.csproj @@ -22,6 +22,7 @@ - .NET 6.0+ - .NET 6.0 Windows.18362+ - UWP 10.0.16299 + - UWP 10.0.17763 with .NET 9 $(NoWarn);NU5128 diff --git a/src/Package/MSTest/PACKAGE.md b/src/Package/MSTest/PACKAGE.md index 0f50ed5df5..1f6f48512f 100644 --- a/src/Package/MSTest/PACKAGE.md +++ b/src/Package/MSTest/PACKAGE.md @@ -11,3 +11,4 @@ Supported platforms: - .NET 6.0+ - .NET 6.0 Windows.18362+ - UWP 10.0.16299 +- UWP 10.0.17763 with .NET 9 \ No newline at end of file diff --git a/src/TestFramework/TestFramework.Extensions/MSTest.TestFramework.nuspec b/src/TestFramework/TestFramework.Extensions/MSTest.TestFramework.nuspec index 3c7f9c9f87..bddef61f37 100644 --- a/src/TestFramework/TestFramework.Extensions/MSTest.TestFramework.nuspec +++ b/src/TestFramework/TestFramework.Extensions/MSTest.TestFramework.nuspec @@ -10,6 +10,7 @@ + PACKAGE.md @@ -70,6 +71,16 @@ + + + + + + + + + + diff --git a/src/TestFramework/TestFramework.Extensions/PACKAGE.md b/src/TestFramework/TestFramework.Extensions/PACKAGE.md index eab7d07745..015957e8d2 100644 --- a/src/TestFramework/TestFramework.Extensions/PACKAGE.md +++ b/src/TestFramework/TestFramework.Extensions/PACKAGE.md @@ -11,3 +11,4 @@ Supported platforms: - .NET 6.0+ - .NET 6.0 Windows.18362+ - UWP 10.0.16299 +- UWP 10.0.17763 with .NET 9 \ No newline at end of file diff --git a/src/TestFramework/TestFramework.Extensions/PublicAPI/net9.0-windows10.0.17763.0/PublicAPI.Shipped.txt b/src/TestFramework/TestFramework.Extensions/PublicAPI/net9.0-windows10.0.17763.0/PublicAPI.Shipped.txt new file mode 100644 index 0000000000..f78acd369f --- /dev/null +++ b/src/TestFramework/TestFramework.Extensions/PublicAPI/net9.0-windows10.0.17763.0/PublicAPI.Shipped.txt @@ -0,0 +1,4 @@ +#nullable enable +Microsoft.VisualStudio.TestTools.UnitTesting.AppContainer.UITestMethodAttribute +Microsoft.VisualStudio.TestTools.UnitTesting.AppContainer.UITestMethodAttribute.UITestMethodAttribute() -> void +override Microsoft.VisualStudio.TestTools.UnitTesting.AppContainer.UITestMethodAttribute.Execute(Microsoft.VisualStudio.TestTools.UnitTesting.ITestMethod! testMethod) -> Microsoft.VisualStudio.TestTools.UnitTesting.TestResult![]! \ No newline at end of file diff --git a/src/TestFramework/TestFramework.Extensions/PublicAPI/net9.0-windows10.0.17763.0/PublicAPI.Unshipped.txt b/src/TestFramework/TestFramework.Extensions/PublicAPI/net9.0-windows10.0.17763.0/PublicAPI.Unshipped.txt new file mode 100644 index 0000000000..815c92006a --- /dev/null +++ b/src/TestFramework/TestFramework.Extensions/PublicAPI/net9.0-windows10.0.17763.0/PublicAPI.Unshipped.txt @@ -0,0 +1 @@ +#nullable enable \ No newline at end of file diff --git a/src/TestFramework/TestFramework.Extensions/TestFramework.Extensions.csproj b/src/TestFramework/TestFramework.Extensions/TestFramework.Extensions.csproj index 5dcc9df4a5..61c680eb19 100644 --- a/src/TestFramework/TestFramework.Extensions/TestFramework.Extensions.csproj +++ b/src/TestFramework/TestFramework.Extensions/TestFramework.Extensions.csproj @@ -5,7 +5,7 @@ - netstandard2.0;$(NetFrameworkMinimum);$(SupportedNetFrameworks);$(UwpMinimum);$(WinUiMinimum) + netstandard2.0;$(NetFrameworkMinimum);$(SupportedNetFrameworks);$(UwpMinimum);$(ModernUwpMinimum);$(WinUiMinimum) $(SupportedNetFrameworks);netstandard2.0 true @@ -13,7 +13,7 @@ true MSTest.TestFramework.nuspec - MSTest.TestFramework.Linux.nuspec + MSTest.TestFramework.NonWindows.nuspec $(OutputPath) MSTest.TestFramework MSTest TestFramework Unittest MSTestV2 Microsoft Test Testing TDD Framework @@ -28,6 +28,7 @@ - .NET 6.0 - .NET 6.0 Windows.18362+ - UWP 10.0.16299 + - UWP 10.0.17763 with .NET 9 @@ -46,12 +47,12 @@ win10-x86;win10-x64;win10-arm64 - - $(DefineConstants);NETFX_CORE;WINDOWS_UWP + + $(DefineConstants);WINDOWS_UWP - + @@ -64,7 +65,7 @@ - + @@ -82,6 +83,9 @@ + + PreserveNewest + PreserveNewest diff --git a/src/TestFramework/TestFramework.Extensions/build/winui+uwp/MSTest.TestFramework.targets b/src/TestFramework/TestFramework.Extensions/build/winui+uwp/MSTest.TestFramework.targets new file mode 100644 index 0000000000..4fa711c2c7 --- /dev/null +++ b/src/TestFramework/TestFramework.Extensions/build/winui+uwp/MSTest.TestFramework.targets @@ -0,0 +1,23 @@ + + + + <_TestFrameworkExtensionsRoot>$(MSBuildThisFileDirectory)../net6.0/winui/ + + + + <_TestFrameworkExtensionsRoot>$(MSBuildThisFileDirectory)../net9.0/uwp/ + + + + <_TestFrameworkExtensionsRoot>$(MSBuildThisFileDirectory) + + + + + $(_TestFrameworkExtensionsRoot)Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll + PreserveNewest + False + + + + diff --git a/src/TestFramework/TestFramework.Extensions/build/winui/MSTest.TestFramework.targets b/src/TestFramework/TestFramework.Extensions/build/winui/MSTest.TestFramework.targets index 0e39a79e7e..1f1b086a30 100644 --- a/src/TestFramework/TestFramework.Extensions/build/winui/MSTest.TestFramework.targets +++ b/src/TestFramework/TestFramework.Extensions/build/winui/MSTest.TestFramework.targets @@ -3,6 +3,9 @@ <_TestFrameworkExtensionsRoot>$(MSBuildThisFileDirectory)../net6.0/winui/ + + <_TestFrameworkExtensionsRoot>$(MSBuildThisFileDirectory)../net9.0/uwp/ + <_TestFrameworkExtensionsRoot>$(MSBuildThisFileDirectory)