Skip to content

Commit 3f756cc

Browse files
authored
[tests] Remove net472 multitargeting (#7932)
We are no longer running the `net472` versions of our desktop tests, and we can save a bit of time by not building them either. I've removed the `net472` version of `xaprepare` as well, as we have a hard dependency on .NET 7+. The `run-msbuild-device-tests.yaml` template was unused and is removed.
1 parent 94cb32e commit 3f756cc

File tree

6 files changed

+5
-123
lines changed

6 files changed

+5
-123
lines changed

Directory.Build.props

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,4 @@
5353
<MdocPackageVersion Condition=" '$(MdocPackageVersion)' == '' ">5.8.9.2</MdocPackageVersion>
5454
</PropertyGroup>
5555

56-
<!-- Properties to help us run managed assemblies on various runtimes.
57-
Ex:
58-
* Mono: mono xaprepare.exe
59-
* Windows .NET: xaprepare.exe
60-
* dotnet: dotnet xaprepare.dll
61-
-->
62-
<PropertyGroup Condition=" '$(MSBuildRuntimeType)' != 'Core' ">
63-
<ManagedToolInvocationRuntime>$(Runtime) </ManagedToolInvocationRuntime>
64-
<ManagedToolInvocationExtension>.exe</ManagedToolInvocationExtension>
65-
</PropertyGroup>
66-
67-
<PropertyGroup Condition=" '$(MSBuildRuntimeType)' == 'Core' ">
68-
<ManagedToolInvocationRuntime>dotnet </ManagedToolInvocationRuntime>
69-
<ManagedToolInvocationExtension>.dll</ManagedToolInvocationExtension>
70-
</PropertyGroup>
7156
</Project>

build-tools/automation/yaml-templates/run-msbuild-device-tests.yaml

Lines changed: 0 additions & 98 deletions
This file was deleted.

build-tools/scripts/PrepareWindows.targets

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
<PropertyGroup>
55
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
66
<_TopDir>$(MSBuildThisFileDirectory)..\..</_TopDir>
7-
<_XAPrepareExe Condition=" '$(MSBuildRuntimeType)' != 'Core' ">"$(MSBuildThisFileDirectory)..\xaprepare\xaprepare\bin\$(Configuration)\xaprepare.exe"</_XAPrepareExe>
87
<_XAPrepareExe Condition=" '$(MSBuildRuntimeType)' == 'Core' ">"$(MSBuildThisFileDirectory)..\xaprepare\xaprepare\bin\$(Configuration)\$(DotNetStableTargetFramework)\xaprepare.dll"</_XAPrepareExe>
98
<_XAPrepareStandardArgs Condition=" '$(RunningOnCI)' == 'true' ">--no-emoji --run-mode=CI -v:d</_XAPrepareStandardArgs>
109
<_XAPrepareStandardArgs Condition=" '$(XA_FORCE_COMPONENT_REFRESH)' == 'true' ">$(_XAPrepareStandardArgs) -refresh</_XAPrepareStandardArgs>
@@ -15,15 +14,15 @@
1514
</Target>
1615
<Target Name="PrepareExternal"
1716
DependsOnTargets="_BuildXAPrepare">
18-
<Exec Command="$(ManagedToolInvocationRuntime)$(_XAPrepareExe) -s:PrepareExternalGitDependencies $(_XAPrepareStandardArgs)" />
17+
<Exec Command="dotnet $(_XAPrepareExe) -s:PrepareExternalGitDependencies $(_XAPrepareStandardArgs)" />
1918
</Target>
2019
<Target Name="Prepare"
2120
DependsOnTargets="_BuildXAPrepare">
2221
<Error
2322
Text="The specified `%24(AndroidToolchainDirectory)` '$(AndroidToolchainDirectory)' contains a space. Android NDK commands do not support this. Please create a Configuration.Override.props file that sets the AndroidToolchainDirectory property to a different path."
2423
Condition="$(AndroidToolchainDirectory.Contains (' '))"
2524
/>
26-
<Exec Command="$(ManagedToolInvocationRuntime)$(_XAPrepareExe) $(_XAPrepareStandardArgs) -a" WorkingDirectory="$(_TopDir)" />
25+
<Exec Command="dotnet $(_XAPrepareExe) $(_XAPrepareStandardArgs) -a" WorkingDirectory="$(_TopDir)" />
2726
<MSBuild Projects="$(_TopDir)\Xamarin.Android.BootstrapTasks.sln" Targets="Restore;Build" />
2827
</Target>
2928
</Project>

build-tools/xaprepare/xaprepare/xaprepare.csproj

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net472;$(DotNetStableTargetFramework)</TargetFrameworks>
4+
<TargetFramework>$(DotNetStableTargetFramework)</TargetFramework>
55
<OutputType>Exe</OutputType>
66
<LangVersion>8.0</LangVersion>
77
<RootNamespace>Xamarin.Android.Prepare</RootNamespace>
@@ -10,10 +10,6 @@
1010
<Nullable>enable</Nullable>
1111
</PropertyGroup>
1212

13-
<PropertyGroup Condition=" '$(TargetFramework)' == 'net472' ">
14-
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
15-
</PropertyGroup>
16-
1713
<Import Project="../../../Configuration.props" />
1814

1915
<ItemGroup>

src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Xamarin.Android.Build.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net472;$(DotNetStableTargetFramework)</TargetFrameworks>
4+
<TargetFramework>$(DotNetStableTargetFramework)</TargetFramework>
55
<LibZipSharpBundleAllNativeLibraries>true</LibZipSharpBundleAllNativeLibraries>
66
<OutputPath>..\..\..\..\bin\Test$(Configuration)</OutputPath>
77
<SignAssembly>true</SignAssembly>

tests/MSBuildDeviceIntegration/MSBuildDeviceIntegration.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net472;$(DotNetStableTargetFramework)</TargetFrameworks>
4+
<TargetFramework>$(DotNetStableTargetFramework)</TargetFramework>
55
<RootNamespace>Xamarin.Android.Build.Tests</RootNamespace>
66
<LibZipSharpBundleAllNativeLibraries>true</LibZipSharpBundleAllNativeLibraries>
77
<OutputPath>..\..\bin\Test$(Configuration)\MSBuildDeviceIntegration\</OutputPath>

0 commit comments

Comments
 (0)