Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add UWP .NET 9 support for MSTest extensions #3848

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<PropertyGroup>
<NetFrameworkMinimum>net462</NetFrameworkMinimum>
<UwpMinimum>uap10.0.16299</UwpMinimum>
<UwpNet9Minimum>net9.0-windows10.0.17763.0</UwpNet9Minimum>
<WinUiMinimum>net6.0-windows10.0.18362.0</WinUiMinimum>
<NetCurrent>net8.0</NetCurrent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@
<file src="net8.0\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll" target="build\net8.0\" />
<file src="net8.0\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml" target="build\net8.0\" />

<!-- net9.0 -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<!-- net9.0 -->
<!-- net9.0-windows10.0.17763.0 -->

<file src="net9.0-windows10.0.17763.0\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll" target="build\net9.0\uwp\" />
<file src="net9.0-windows10.0.17763.0\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml" target="build\net9.0\uwp\" />

<!-- Source code -->
<file src="$srcroot$\**\*.cs" target="src" />

Expand Down
Original file line number Diff line number Diff line change
@@ -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![]!
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" Condition=" '$(OS)' != 'Windows_NT' " />

<PropertyGroup>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">netstandard2.0;$(NetFrameworkMinimum);$(SupportedNetFrameworks);$(UwpMinimum);$(WinUiMinimum)</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">netstandard2.0;$(NetFrameworkMinimum);$(SupportedNetFrameworks);$(UwpMinimum);$(UwpNet9Minimum);$(WinUiMinimum)</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">$(SupportedNetFrameworks);netstandard2.0</TargetFrameworks>
<UseAssemblyVersion14>true</UseAssemblyVersion14>
</PropertyGroup>
Expand All @@ -28,6 +28,7 @@
- .NET 6.0
- .NET 6.0 Windows.18362+
- UWP 10.0.16299
- UWP 10.0.17763 with .NET 9
</PackageDescription>
</PropertyGroup>

Expand All @@ -49,6 +50,13 @@
<PropertyGroup Condition=" '$(TargetFramework)' == '$(UwpMinimum)' ">
<DefineConstants>$(DefineConstants);NETFX_CORE;WINDOWS_UWP</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == '$(UwpNet9Minimum)' ">
<DefineConstants>$(DefineConstants);WINDOWS_UWP</DefineConstants>
<TargetPlatformVersion>10.0.17763.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion>10.0.17763.0</SupportedOSPlatformVersion>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
</PropertyGroup>

<ItemGroup>
<ProjectReference Condition=" '$(TargetFramework)' == '$(UwpMinimum)' " Include="$(RepoRoot)src\TestFramework\TestFramework\TestFramework.csproj" SetTargetFramework="TargetFramework=netstandard2.0" Private="True" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
<PropertyGroup Condition=" '$(UseWinUI)' == 'true' ">
<_TestFrameworkExtensionsRoot>$(MSBuildThisFileDirectory)../net6.0/winui/</_TestFrameworkExtensionsRoot>
</PropertyGroup>
<PropertyGroup Condition=" '$(UseUwpTools)' == 'true' ">
<_TestFrameworkExtensionsRoot>$(MSBuildThisFileDirectory)../net9.0/uwp/</_TestFrameworkExtensionsRoot>
</PropertyGroup>
<PropertyGroup Condition=" '$(UseWinUI)' != 'true' ">
<_TestFrameworkExtensionsRoot>$(MSBuildThisFileDirectory)</_TestFrameworkExtensionsRoot>
</PropertyGroup>
Expand Down
Loading