Skip to content

Commit

Permalink
Remove UAP/UWP support
Browse files Browse the repository at this point in the history
  • Loading branch information
bradwilson committed Jun 28, 2023
1 parent 5308021 commit aeba1bb
Show file tree
Hide file tree
Showing 15 changed files with 15 additions and 62 deletions.
1 change: 0 additions & 1 deletion BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ You will need the following software installed:
* .NET Framework 4.7.2 or later (part of the Windows OS)
* [Visual Studio 2022 or later](https://visualstudio.microsoft.com/vs/)
* ".NET desktop development" workload
* "Universal Windows Platform development" workload
* Additional components:
* .NET Framework development tools for 3.5
* .NET Framework targeting packs for 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ xUnit.net is a free, open source, community-focused unit testing tool for the .N

For project documentation, please visit the [xUnit.net project home](https://xunit.net/).

* _New to xUnit.net? Get started with [.NET Framework](https://xunit.net/docs/getting-started/netfx/visual-studio), [.NET Core](https://xunit.net/docs/getting-started/netcore/cmdline), and [devices](https://xunit.net/docs/getting-started/uwp/devices-runner)._
* _New to xUnit.net? Get started with [.NET Framework](https://xunit.net/docs/getting-started/netfx/visual-studio) and [.NET Core](https://xunit.net/docs/getting-started/netcore/cmdline)._
* _Need some help building the source? See [BUILDING.md](https://github.com/xunit/xunit/tree/v2/BUILDING.md)._
* _Want to contribute to the project? See [CONTRIBUTING.md](https://github.com/xunit/.github/tree/main/CONTRIBUTING.md)._
* _Want to contribute to the assertion library? See the [suggested contribution workflow](https://github.com/xunit/assert.xunit/tree/main/README.md#suggested-contribution-workflow) in the assertion library project, as it is slightly more complex due to code being spread across two GitHub repositories._
Expand Down
6 changes: 1 addition & 5 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
{
"msbuild-sdks": {
"MSBuild.Sdk.Extras": "3.0.44"
}
}
{ }
2 changes: 0 additions & 2 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
<PackageId>$(MSBuildProjectName)</PackageId>
<RootNamespace>Xunit</RootNamespace>
<SignAssembly>true</SignAssembly>
<TargetPlatformMinVersion Condition=" '$(TargetFramework)' == 'uap10.0' ">10.0.16299.0</TargetPlatformMinVersion>
<TargetPlatformVersion Condition=" '$(TargetFramework)' == 'uap10.0' ">10.0.19041.0</TargetPlatformVersion>
<WarningsAsErrors>true</WarningsAsErrors>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if NETSTANDARD1_1 || NETSTANDARD1_5 || WINDOWS_UAP
#if NETSTANDARD1_1 || NETSTANDARD1_5

using System;
using Xunit.Abstractions;
Expand Down
2 changes: 1 addition & 1 deletion src/common/XunitWorkerThread.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if NETSTANDARD1_1 || NETSTANDARD1_5 || WINDOWS_UAP
#if NETSTANDARD1_1 || NETSTANDARD1_5

using System;
using System.Threading;
Expand Down
9 changes: 1 addition & 8 deletions src/xunit.runner.utility.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<licenseUrl>https://licenses.nuget.org/Apache-2.0</licenseUrl>
<icon>_content/logo-128-transparent.png</icon>
<readme>_content/README.md</readme>
<description>Includes the version-independent runner for xUnit.net to run both v1.9.2 and v2.0+ tests (xunit.runner.utility.*.dll). Supports .NET 3.5, .NET 4.5.2 or later, .NET Standard 1.1, .NET Standard 1.5, UWP, and .NET Core 1.0 or later.</description>
<description>Includes the version-independent runner for xUnit.net to run both v1.9.2 and v2.0+ tests (xunit.runner.utility.*.dll). Supports .NET 3.5, .NET 4.5.2 or later, .NET Standard 1.1, .NET Standard 1.5, and .NET Core 1.0 or later.</description>
<copyright>Copyright (C) .NET Foundation</copyright>
<repository type="git" url="https://github.com/xunit/xunit" commit="$GitCommitId$" />
<dependencies>
Expand All @@ -34,9 +34,6 @@
<dependency id="System.Runtime.Loader" version="4.0.0" />
<dependency id="xunit.abstractions" version="2.0.3" />
</group>
<group targetFramework="uap10.0">
<dependency id="xunit.abstractions" version="2.0.3" />
</group>
</dependencies>
</metadata>
<files>
Expand All @@ -57,9 +54,5 @@

<file src="xunit.runner.utility\bin\$Configuration$\netcoreapp1.0\xunit.runner.utility.netcoreapp10.dll" target="lib\netcoreapp1.0\" />
<file src="xunit.runner.utility\bin\$Configuration$\netcoreapp1.0\xunit.runner.utility.netcoreapp10.xml" target="lib\netcoreapp1.0\" />

<file src="xunit.runner.utility\bin\$Configuration$\uap10.0\xunit.runner.utility.uwp10.dll" target="lib\uap10.0\" />
<file src="xunit.runner.utility\bin\$Configuration$\uap10.0\xunit.runner.utility.uwp10.xml" target="lib\uap10.0\" />
<file src="xunit.runner.utility\bin\$Configuration$\uap10.0\xunit.runner.utility.uwp10.pri" target="lib\uap10.0\" />
</files>
</package>
2 changes: 0 additions & 2 deletions src/xunit.runner.utility/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
[assembly: AssemblyTitle("xUnit.net Runner Utility (.NET Standard 2.0)")]
#elif NETCOREAPP1_0
[assembly: AssemblyTitle("xUnit.net Runner Utility (.NET Core 1.0)")]
#elif WINDOWS_UAP
[assembly: AssemblyTitle("xUnit.net Runner Utility (Universal Windows 10.0)")]
#else
#error Unknown target platform
#endif
Expand Down

This file was deleted.

8 changes: 0 additions & 8 deletions src/xunit.runner.utility/Utility/DiaSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,7 @@ public DiaNavigationData GetNavigationData(string typeName, string methodName, s
typeName = typeName.Substring(0, idx);

if (!wrappedSessions.ContainsKey(owningAssemblyFilename))
{
#if WINDOWS_UAP
// Use overload with search path since pdb isn't next to the exe
wrappedSessions[owningAssemblyFilename] = (IDisposable)Activator.CreateInstance(typeDiaSession, owningAssemblyFilename,
Windows.ApplicationModel.Package.Current.InstalledLocation.Path);
#else
wrappedSessions[owningAssemblyFilename] = (IDisposable)Activator.CreateInstance(typeDiaSession, owningAssemblyFilename);
#endif
}

var data = methodGetNavigationData.Invoke(wrappedSessions[owningAssemblyFilename], new[] { typeName, methodName });
if (data == null)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if NETSTANDARD1_5 || NETCOREAPP || WINDOWS_UAP
#if NETSTANDARD1_5 || NETCOREAPP

using System;
using System.Collections.Generic;
Expand Down Expand Up @@ -60,13 +60,7 @@ public void Normalize(ref string typeName, ref string methodName, ref string ass
{
// DiaSession only ever wants you to ask for the declaring type
typeName = method.DeclaringType.FullName;

#if WINDOWS_UAP
assemblyPath = Path.Combine(Windows.ApplicationModel.Package.Current.InstalledLocation.Path, assemblyPath);
#else
assemblyPath = method.DeclaringType.GetAssembly().Location;
#endif

var stateMachineType = method.GetCustomAttribute<AsyncStateMachineAttribute>()?.StateMachineType;

if (stateMachineType != null)
Expand Down
4 changes: 2 additions & 2 deletions src/xunit.runner.utility/Utility/DiaSessionWrapper_DotNet.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#if NETSTANDARD1_5 || NETCOREAPP || WINDOWS_UAP
#if NETSTANDARD1_5 || NETCOREAPP

using System;

namespace Xunit
{
// This class wraps DiaSession, and uses DiaSessionWrapperHelper discover when a test is an async test
// This class wraps DiaSession, and uses DiaSessionWrapperHelper discover when a test is an async test
// (since that requires special handling by DIA).
class DiaSessionWrapper : IDisposable
{
Expand Down
10 changes: 2 additions & 8 deletions src/xunit.runner.utility/xunit.runner.utility.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
<Project Sdk="MSBuild.Sdk.Extras">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<AssemblyName Condition=" '$(TargetFramework)' == 'net35' ">xunit.runner.utility.net35</AssemblyName>
<AssemblyName Condition=" '$(TargetFramework)' == 'net452' ">xunit.runner.utility.net452</AssemblyName>
<AssemblyName Condition=" '$(TargetFramework)' == 'netstandard1.1' ">xunit.runner.utility.netstandard11</AssemblyName>
<AssemblyName Condition=" '$(TargetFramework)' == 'netstandard1.5' ">xunit.runner.utility.netstandard15</AssemblyName>
<AssemblyName Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">xunit.runner.utility.netcoreapp10</AssemblyName>
<AssemblyName Condition=" '$(TargetFramework)' == 'uap10.0' ">xunit.runner.utility.uwp10</AssemblyName>
<DefineConstants Condition=" '$(TargetFramework)' == 'uap10.0' ">$(DefineConstants);WINDOWS_UAP</DefineConstants>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<RootNamespace>Xunit</RootNamespace>
<TargetFrameworks>net35;net452;netstandard1.1;netstandard1.5;netcoreapp1.0;uap10.0</TargetFrameworks>
<TargetFrameworks>net35;net452;netstandard1.1;netstandard1.5;netcoreapp1.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -60,8 +58,4 @@
<PackageReference Include="System.Runtime.Loader" Version="4.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'uap10.0' ">
<EmbeddedResource Include="Resources\xunit.runner.utility.uwp10.rd.xml" />
</ItemGroup>

</Project>
13 changes: 4 additions & 9 deletions test/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>

<Import Condition=" '$(MSBuildProjectName)' != 'test.utility' and '$(MSBuildProjectName)' != 'test.harness.uwp' " Project="..\src\xunit.core\build\xunit.core.props" />
<Import Condition=" '$(MSBuildProjectName)' != 'test.utility' " Project="..\src\xunit.core\build\xunit.core.props" />

<Import Condition=" '$(_Xunit_ImportPropsFile)' != '' " Project="$(_Xunit_ImportPropsFile)" />

Expand All @@ -26,13 +26,8 @@
</Content>
</ItemGroup>

<!-- Need this Choose/When for legacy projects (UWP) in the IDE -->
<Choose>
<When Condition=" '$(MSBuildProjectName)' != 'test.utility' AND '$(MSBuildProjectName)' != 'test.xunit1' and '$(MSBuildProjectName)' != 'test.harness.uwp' ">
<ItemGroup>
<ProjectReference Include="$(MSBuildThisFileDirectory)test.utility\test.utility.csproj" />
</ItemGroup>
</When>
</Choose>
<ItemGroup Condition=" '$(MSBuildProjectName)' != 'test.utility' AND '$(MSBuildProjectName)' != 'test.xunit1' ">
<ProjectReference Include="$(MSBuildThisFileDirectory)test.utility\test.utility.csproj" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion test/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>

<Import Condition=" '$(MSBuildProjectName)' != 'test.utility' and '$(MSBuildProjectName)' != 'test.harness.uwp' " Project="..\src\xunit.core\build\xunit.core.targets" />
<Import Condition=" '$(MSBuildProjectName)' != 'test.utility' " Project="..\src\xunit.core\build\xunit.core.targets" />

<Import Condition=" '$(_Xunit_ImportTargetsFile)' != '' " Project="$(_Xunit_ImportTargetsFile)" />

Expand Down

0 comments on commit aeba1bb

Please sign in to comment.