Specify the minimum versions of the platforms (#2905)

* Specify the minimum versions of the platforms

* maccat 13.1

* win10

* Merge all the version numbers

* ws

* not needed as winui controls these numbers

* seems this is not real

* we are going global!
This commit is contained in:
Matthew Leibowitz 2021-10-20 16:41:34 +02:00 коммит произвёл GitHub
Родитель b0bf437a33
Коммит 0369a6b3b6
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
17 изменённых файлов: 45 добавлений и 74 удалений

Просмотреть файл

@ -97,9 +97,7 @@
<PackageReference Include="Xamarin.AndroidX.Navigation.Runtime" />
<PackageReference Include="Xamarin.AndroidX.Navigation.Common" />
</ItemGroup>
<PropertyGroup Condition="$(TargetFramework.Contains('-windows')) == true ">
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
<PropertyGroup Condition="$(TargetFramework.Contains('-windows'))">
<DefineConstants>WINDOWS;$(DefineConstants)</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" $(TargetFramework.StartsWith('uap10.0')) ">

Просмотреть файл

@ -194,23 +194,4 @@
Text="The %24(TargetFrameworkVersion) for $(ProjectName) ($(TargetFrameworkVersion)) is less than the minimum required %24(TargetFrameworkVersion) for Microsoft.Maui ($(MinTargetFrameworkVersionForMaui)). You need to increase the %24(TargetFrameworkVersion) for $(ProjectName)." />
</Target>
<!-- UWP Targets-->
<Target Name="WinUICheckTargetPlatformVersion" BeforeTargets="PrepareForBuild"
Condition="'$(TargetPlatformIdentifier)' == 'UAP' AND '$(TargetPlatformVersion)' != '' AND '$(TargetPlatformMinVersion)' != ''">
<PropertyGroup>
<MicrosoftUIXamlTargetPlatformMinCheckValue>$([System.Version]::Parse('$(TargetPlatformMinVersion)').Build)</MicrosoftUIXamlTargetPlatformMinCheckValue>
</PropertyGroup>
<Warning
Text="Microsoft.Maui recommends TargetPlatformMinVersion &gt;= 10.0.15063.0 (current project is $(MicrosoftUIXamlTargetPlatformMinCheckValue))"
Condition="$(MicrosoftUIXamlTargetPlatformMinCheckValue) &lt; 15063" />
<PropertyGroup>
<MicrosoftUIXamlTargetPlatformCheckValue>$([System.Version]::Parse('$(TargetPlatformVersion)').Build)</MicrosoftUIXamlTargetPlatformCheckValue>
</PropertyGroup>
<Warning
Text="Microsoft.Maui recommends TargetPlatformVersion &gt;= 10.0.18362.0 (current project is $(MicrosoftUIXamlTargetPlatformCheckValue))"
Condition="$(MicrosoftUIXamlTargetPlatformCheckValue) &lt; 18362 AND '$(OutputType)'!='Library'" />
<Warning
Text="Microsoft.Maui recommends TargetPlatformVersion &gt;= 10.0.14393.0 (current project is $(MicrosoftUIXamlTargetPlatformCheckValue))"
Condition="$(MicrosoftUIXamlTargetPlatformCheckValue) &lt; 14393 AND '$(OutputType)'=='Library'" />
</Target>
</Project>

Просмотреть файл

@ -17,17 +17,22 @@
<DisableEmbeddedXbf>false</DisableEmbeddedXbf>
<!-- Workaround: https://github.com/dotnet/sdk/issues/19050 -->
<DisableImplicitNamespaceImports>true</DisableImplicitNamespaceImports>
</PropertyGroup>
<SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net6.0-ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net6.0-maccatalyst'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net6.0-android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$(TargetFramework.Contains('-windows'))">10.0.18362.0</SupportedOSPlatformVersion>
<!-- version number information -->
<PropertyGroup>
<IosTargetFrameworkVersion>13.6</IosTargetFrameworkVersion>
<TvosTargetFrameworkVersion>13.6</TvosTargetFrameworkVersion>
<MacCatalystTargetFrameworkVersion>13.5</MacCatalystTargetFrameworkVersion>
<MacosTargetFrameworkVersion>10.14</MacosTargetFrameworkVersion>
<AndroidTargetFrameworkVersion>30.0</AndroidTargetFrameworkVersion>
<WindowsTargetFrameworkVersion>10.0.19041</WindowsTargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(BuildForLegacy)' != 'True'">
<!-- the real TFMs -->
<MauiPlatforms>net6.0-ios;net6.0-maccatalyst;net6.0-android</MauiPlatforms>
<WindowsMauiPlatforms Condition="'$(WindowsMauiPlatforms)' == ''">net6.0-windows10.0.19041;net6.0-windows10.0.18362</WindowsMauiPlatforms>
<WindowsMauiPlatforms Condition="'$(WindowsMauiPlatforms)' == ''">net6.0-windows$(WindowsTargetFrameworkVersion)</WindowsMauiPlatforms>
<MauiPlatforms Condition="'$(IncludeWindowsTargetFrameworks)' == 'true'">$(MauiPlatforms);$(WindowsMauiPlatforms)</MauiPlatforms>
<!-- Work around the IDE not properly handling the NU1703 warning -->
@ -74,7 +79,6 @@
<Product>Microsoft MAUI</Product>
<ProduceReferenceAssembly Condition="'$(UsingMicrosoftNETSdk)' == 'True' AND '$(Configuration)' == 'Debug'">True</ProduceReferenceAssembly>
<ProduceReferenceAssemblyInOutDir>True</ProduceReferenceAssemblyInOutDir>
<TargetPlatformMinVersion Condition="'$(TargetPlatformMinVersion)' == '' and $(TargetFramework.Contains('-windows'))">10.0.17763.0</TargetPlatformMinVersion>
<Win2DWarnNoPlatform>false</Win2DWarnNoPlatform>
<!-- When setting UseInternalWinUIPackages=true, make sure to also uncomment the "wasdk-internal" nuget source in NuGet.config -->
<!-- <UseInternalWinUIPackages>true</UseInternalWinUIPackages> -->

Просмотреть файл

@ -6,6 +6,32 @@
<Import Project="eng\AndroidX.targets" />
<Import Project="eng\Microsoft.Extensions.targets" />
<!-- platform version number information -->
<PropertyGroup Condition="$(TargetFramework.Contains('-ios'))">
<SupportedOSPlatformVersion>10.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion>10.0</TargetPlatformMinVersion>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.Contains('-tvos'))">
<SupportedOSPlatformVersion>10.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion>10.0</TargetPlatformMinVersion>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.Contains('-maccatalyst'))">
<SupportedOSPlatformVersion>13.1</SupportedOSPlatformVersion>
<TargetPlatformMinVersion>13.1</TargetPlatformMinVersion>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.Contains('-macos'))">
<SupportedOSPlatformVersion>10.14</SupportedOSPlatformVersion>
<TargetPlatformMinVersion>10.14</TargetPlatformMinVersion>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.Contains('-android'))">
<SupportedOSPlatformVersion>21.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion>21.0</TargetPlatformMinVersion>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.Contains('-windows10'))">
<SupportedOSPlatformVersion>10.0.17763</SupportedOSPlatformVersion>
<TargetPlatformMinVersion>10.0.17763</TargetPlatformMinVersion>
</PropertyGroup>
<!--
Comment out this section if you need to update Resource.designer.cs files.
See .github/DEVELOPMENT.md#Android for details.
@ -14,7 +40,6 @@
<AndroidGenerateResourceDesigner>false</AndroidGenerateResourceDesigner>
<AndroidUseIntermediateDesignerFile>false</AndroidUseIntermediateDesignerFile>
</PropertyGroup>
<!-- HACK: Prevent the Platform checks -->
<Target Name="BinPlaceBootstrapDll" />
@ -26,8 +51,7 @@
<!-- Until we get a new enough dotnet -->
<ItemGroup>
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" RuntimeFrameworkVersion="10.0.18362.19" />
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.18362.19" />
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" RuntimeFrameworkVersion="10.0.18362.18" TargetingPackVersion="10.0.18362.18" />
</ItemGroup>
</Project>

Просмотреть файл

@ -130,6 +130,7 @@ string[] androidSdkManagerInstalls = androidSdks.Split(',');
{
("10.0.19041.0", "https://go.microsoft.com/fwlink/p/?linkid=2120843", "OptionId.WindowsPerformanceToolkit OptionId.WindowsDesktopDebuggers OptionId.AvrfExternal OptionId.WindowsSoftwareLogoToolkit OptionId.MSIInstallTools OptionId.SigningTools OptionId.UWPManaged OptionId.UWPCPP OptionId.UWPLocalized OptionId.DesktopCPPx86 OptionId.DesktopCPPx64 OptionId.DesktopCPParm OptionId.DesktopCPParm64"),
("10.0.18362.0", "https://go.microsoft.com/fwlink/?linkid=2083338", "+"),
("10.0.17763.0", "https://go.microsoft.com/fwlink/p/?linkid=2033908", "+"),
("10.0.16299.0", "https://go.microsoft.com/fwlink/p/?linkid=864422", "+"),
("10.0.14393.0", "https://go.microsoft.com/fwlink/p/?LinkId=838916", "+")
};

Просмотреть файл

@ -1,28 +1 @@
<Project>
<!--<PropertyGroup>
<WindowsXamlEnableOverview>true</WindowsXamlEnableOverview>
<UsingMicrosoftNETSdk>false</UsingMicrosoftNETSdk>
<IsWinUIAlpha Condition="'$(IsWinUIAlpha)' == ''">true</IsWinUIAlpha>
<WindowsKitsPath Condition="'$(IsWinUIAlpha)' == 'true'">WinUI-Alpha-Projects-Don-t-Use-SDK-Xaml-Tools</WindowsKitsPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(UwpMinTargetFrameworks)' != '' ">
<TargetFrameworks>$(UwpMinTargetFrameworks)</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition=" '$(UwpMinTargetFrameworks)' == '' ">
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">uap10.0.17763</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netstandard2.0</TargetFrameworks>
</PropertyGroup>
<PropertyGroup>
<TargetPlatformVersion Condition="'$(TargetFramework)' == 'uap10.0.14393'">10.0.19041.0</TargetPlatformVersion>
<TargetPlatformVersion Condition="'$(TargetFramework)' == 'uap10.0.17763'">10.0.19041.0</TargetPlatformVersion>
</PropertyGroup>
<PropertyGroup Condition=" $(TargetFramework.StartsWith('uap10.0')) ">
<DefineConstants>$(DefineConstants);UWP</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'uap10.0.14393'">
<DefineConstants>$(DefineConstants);UWP_14393</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'uap10.0.17763' ">
<DefineConstants>$(DefineConstants);UWP_18362;UWP_19041;UWP_14393;UWP_17763;UWP_16299</DefineConstants>
</PropertyGroup>-->
</Project>
<Project />

Просмотреть файл

@ -12,7 +12,6 @@
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<SkipMicrosoftUIXamlCheckTargetPlatformVersion>true</SkipMicrosoftUIXamlCheckTargetPlatformVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>

Просмотреть файл

@ -12,7 +12,6 @@
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<EnableDotNetNativeCompatibleProfile>true</EnableDotNetNativeCompatibleProfile>
<FileAlignment>512</FileAlignment>

Просмотреть файл

@ -6,7 +6,6 @@
<RootNamespace>Maui.Controls.Sample</RootNamespace>
<AssemblyName>Maui.Controls.Sample</AssemblyName>
<IsPackable>false</IsPackable>
<TargetPlatformMinVersion Condition="$(TargetFramework.Contains('-windows')) == true ">10.0.17763.0</TargetPlatformMinVersion>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.Contains('-windows')) == true ">

Просмотреть файл

@ -12,7 +12,6 @@
<PropertyGroup Condition="$(TargetFramework.Contains('-windows')) == true ">
<NoWarn>$(NoWarn);CA1416</NoWarn>
<DefineConstants>$(DefineConstants);WINDOWS</DefineConstants>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
</PropertyGroup>

Просмотреть файл

@ -12,7 +12,6 @@
<AssemblyName>Microsoft.Maui.Controls.DeviceTests</AssemblyName>
<OutputType Condition="$(TargetFramework.Contains('-windows'))">WinExe</OutputType>
<TargetPlatformMinVersion Condition="$(TargetFramework.Contains('-windows'))">10.0.17763.0</TargetPlatformMinVersion>
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
<WindowsPackageType>MSIX</WindowsPackageType>
</PropertyGroup>

Просмотреть файл

@ -12,7 +12,6 @@
<AssemblyName>Microsoft.Maui.Core.DeviceTests</AssemblyName>
<OutputType Condition="$(TargetFramework.Contains('-windows'))">WinExe</OutputType>
<TargetPlatformMinVersion Condition="$(TargetFramework.Contains('-windows'))">10.0.17763.0</TargetPlatformMinVersion>
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
<WindowsPackageType>MSIX</WindowsPackageType>
</PropertyGroup>

Просмотреть файл

@ -9,7 +9,6 @@
<IsPackable>false</IsPackable>
<OutputType Condition="$(TargetFramework.Contains('-windows'))">WinExe</OutputType>
<TargetPlatformMinVersion Condition="$(TargetFramework.Contains('-windows'))">10.0.17763.0</TargetPlatformMinVersion>
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
<WindowsPackageType>MSIX</WindowsPackageType>
</PropertyGroup>

Просмотреть файл

@ -12,7 +12,6 @@
<AssemblyName>Microsoft.Maui.Essentials.DeviceTests</AssemblyName>
<OutputType Condition="$(TargetFramework.Contains('-windows'))">WinExe</OutputType>
<TargetPlatformMinVersion Condition="$(TargetFramework.Contains('-windows'))">10.0.17763.0</TargetPlatformMinVersion>
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
<WindowsPackageType>MSIX</WindowsPackageType>
</PropertyGroup>

Просмотреть файл

@ -11,7 +11,6 @@
<RootNamespace>Microsoft.Maui.TestUtils.DeviceTests.Sample</RootNamespace>
<AssemblyName>Microsoft.Maui.TestUtils.DeviceTests.Sample</AssemblyName>
<OutputType Condition="$(TargetFramework.Contains('-windows'))">WinExe</OutputType>
<TargetPlatformMinVersion Condition="$(TargetFramework.Contains('-windows'))">10.0.17763.0</TargetPlatformMinVersion>
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
<WindowsPackageType>MSIX</WindowsPackageType>
</PropertyGroup>

Просмотреть файл

@ -6,7 +6,6 @@
<PropertyGroup>
<TargetFrameworks>net6.0;$(MauiPlatformsNoMacCat)</TargetFrameworks>
<TargetPlatformMinVersion Condition="$(TargetFramework.Contains('-windows'))">10.0.17763.0</TargetPlatformMinVersion>
<SingleProject>true</SingleProject>
<RootNamespace>Microsoft.Maui.TestUtils.DeviceTests.Runners</RootNamespace>
<AssemblyName>Microsoft.Maui.TestUtils.DeviceTests.Runners</AssemblyName>

Просмотреть файл

@ -17,30 +17,30 @@
/>
<_TargetPlatform
Condition=" '$(MauiPlatformName)' == 'android' "
Include="net6.0-android30.0"
Include="net6.0-android$(AndroidTargetFrameworkVersion)"
FullTfm="%(Identity)"
Tfm="net6.0-android"
Profile="Android"
/>
<_TargetPlatform
Condition=" '$(MauiPlatformName)' == 'ios' "
Include="net6.0-ios13.6"
Include="net6.0-ios$(IosTargetFrameworkVersion)"
FullTfm="%(Identity)"
Tfm="net6.0-ios"
Profile="iOS"
/>
<_TargetPlatform
Condition=" '$(MauiPlatformName)' == 'maccatalyst' "
Include="net6.0-maccatalyst13.5"
Include="net6.0-maccatalyst$(MacCatalystTargetFrameworkVersion)"
FullTfm="%(Identity)"
Tfm="net6.0-maccatalyst"
Profile="MacCatalyst"
/>
<_TargetPlatform
Condition=" '$(MauiPlatformName)' == 'win' "
Include="net6.0-windows10.0.18362"
Include="net6.0-windows$(WindowsTargetFrameworkVersion)"
FullTfm="%(Identity)"
Tfm="net6.0-windows10.0.18362"
Tfm="net6.0-windows$(WindowsTargetFrameworkVersion)"
Profile="Windows"
/>
</ItemGroup>