Skip to content

Commit

Permalink
[build] Remove net472 multitargeting
Browse files Browse the repository at this point in the history
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+.
  • Loading branch information
pjcollins committed Mar 31, 2023
1 parent a9cdbd7 commit 515a8ca
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 123 deletions.
15 changes: 0 additions & 15 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,4 @@
<MdocPackageVersion Condition=" '$(MdocPackageVersion)' == '' ">5.8.9.2</MdocPackageVersion>
</PropertyGroup>

<!-- Properties to help us run managed assemblies on various runtimes.
Ex:
* Mono: mono xaprepare.exe
* Windows .NET: xaprepare.exe
* dotnet: dotnet xaprepare.dll
-->
<PropertyGroup Condition=" '$(MSBuildRuntimeType)' != 'Core' ">
<ManagedToolInvocationRuntime>$(Runtime) </ManagedToolInvocationRuntime>
<ManagedToolInvocationExtension>.exe</ManagedToolInvocationExtension>
</PropertyGroup>

<PropertyGroup Condition=" '$(MSBuildRuntimeType)' == 'Core' ">
<ManagedToolInvocationRuntime>dotnet </ManagedToolInvocationRuntime>
<ManagedToolInvocationExtension>.dll</ManagedToolInvocationExtension>
</PropertyGroup>
</Project>

This file was deleted.

5 changes: 2 additions & 3 deletions build-tools/scripts/PrepareWindows.targets
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<_TopDir>$(MSBuildThisFileDirectory)..\..</_TopDir>
<_XAPrepareExe Condition=" '$(MSBuildRuntimeType)' != 'Core' ">"$(MSBuildThisFileDirectory)..\xaprepare\xaprepare\bin\$(Configuration)\xaprepare.exe"</_XAPrepareExe>
<_XAPrepareExe Condition=" '$(MSBuildRuntimeType)' == 'Core' ">"$(MSBuildThisFileDirectory)..\xaprepare\xaprepare\bin\$(Configuration)\$(DotNetStableTargetFramework)\xaprepare.dll"</_XAPrepareExe>
<_XAPrepareStandardArgs Condition=" '$(RunningOnCI)' == 'true' ">--no-emoji --run-mode=CI -v:d</_XAPrepareStandardArgs>
<_XAPrepareStandardArgs Condition=" '$(XA_FORCE_COMPONENT_REFRESH)' == 'true' ">$(_XAPrepareStandardArgs) -refresh</_XAPrepareStandardArgs>
Expand All @@ -15,15 +14,15 @@
</Target>
<Target Name="PrepareExternal"
DependsOnTargets="_BuildXAPrepare">
<Exec Command="$(ManagedToolInvocationRuntime)$(_XAPrepareExe) -s:PrepareExternalGitDependencies $(_XAPrepareStandardArgs)" />
<Exec Command="dotnet $(_XAPrepareExe) -s:PrepareExternalGitDependencies $(_XAPrepareStandardArgs)" />
</Target>
<Target Name="Prepare"
DependsOnTargets="_BuildXAPrepare">
<Error
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."
Condition="$(AndroidToolchainDirectory.Contains (' '))"
/>
<Exec Command="$(ManagedToolInvocationRuntime)$(_XAPrepareExe) $(_XAPrepareStandardArgs) -a" WorkingDirectory="$(_TopDir)" />
<Exec Command="dotnet $(_XAPrepareExe) $(_XAPrepareStandardArgs) -a" WorkingDirectory="$(_TopDir)" />
<MSBuild Projects="$(_TopDir)\Xamarin.Android.BootstrapTasks.sln" Targets="Restore;Build" />
</Target>
</Project>
6 changes: 1 addition & 5 deletions build-tools/xaprepare/xaprepare/xaprepare.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net472;$(DotNetStableTargetFramework)</TargetFrameworks>
<TargetFramework>$(DotNetStableTargetFramework)</TargetFramework>
<OutputType>Exe</OutputType>
<LangVersion>8.0</LangVersion>
<RootNamespace>Xamarin.Android.Prepare</RootNamespace>
Expand All @@ -10,10 +10,6 @@
<Nullable>enable</Nullable>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net472' ">
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>

<Import Project="../../../Configuration.props" />

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net472;$(DotNetStableTargetFramework)</TargetFrameworks>
<TargetFramework>$(DotNetStableTargetFramework)</TargetFramework>
<LibZipSharpBundleAllNativeLibraries>true</LibZipSharpBundleAllNativeLibraries>
<OutputPath>..\..\..\..\bin\Test$(Configuration)</OutputPath>
<SignAssembly>true</SignAssembly>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net472;$(DotNetStableTargetFramework)</TargetFrameworks>
<TargetFramework>$(DotNetStableTargetFramework)</TargetFramework>
<RootNamespace>Xamarin.Android.Build.Tests</RootNamespace>
<LibZipSharpBundleAllNativeLibraries>true</LibZipSharpBundleAllNativeLibraries>
<OutputPath>..\..\bin\Test$(Configuration)\MSBuildDeviceIntegration\</OutputPath>
Expand Down

0 comments on commit 515a8ca

Please sign in to comment.