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 SupportedOSPlatformVersion #2565

Merged
merged 12 commits into from
Sep 21, 2021
5 changes: 5 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
<DisableEmbeddedXbf>false</DisableEmbeddedXbf>
<!-- Workaround: https://github.com/dotnet/sdk/issues/19050 -->
<DisableImplicitNamespaceImports>true</DisableImplicitNamespaceImports>

<SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net6.0-ios'">14.2</SupportedOSPlatformVersion>
Copy link
Member

Choose a reason for hiding this comment

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

What is our min for iOS? 10? 10.x? 11?

<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>
</PropertyGroup>

<PropertyGroup Condition="'$(BuildForLegacy)' != 'True'">
Expand Down
18 changes: 9 additions & 9 deletions eng/cake/dotnet.cake
Original file line number Diff line number Diff line change
Expand Up @@ -79,28 +79,28 @@ Task("dotnet-templates")

var dn = localDotnet ? dotnetPath : "dotnet";

CleanDirectories("./templatesTest/");
CleanDirectories("../templatesTest/");

// Create empty Directory.Build.props/targets
EnsureDirectoryExists(Directory("./templatesTest/"));
FileWriteText(File("./templatesTest/Directory.Build.props"), "<Project/>");
FileWriteText(File("./templatesTest/Directory.Build.targets"), "<Project/>");
EnsureDirectoryExists(Directory("../templatesTest/"));
FileWriteText(File("../templatesTest/Directory.Build.props"), "<Project/>");
FileWriteText(File("../templatesTest/Directory.Build.targets"), "<Project/>");

// Create an empty NuGet.config
StartProcess(dn, "new nugetconfig -o ./templatesTest/");
StartProcess(dn, "new nugetconfig -o ../templatesTest/");
var properties = new Dictionary<string, string> {
// Properties that ensure we don't use cached packages, and *only* the empty NuGet.config
{ "RestoreNoCache", "true" },
{ "RestorePackagesPath", MakeAbsolute(File("./templatesTest/packages")).FullPath },
{ "RestoreConfigFile", MakeAbsolute(File("./templatesTest/nuget.config")).FullPath },
{ "RestorePackagesPath", MakeAbsolute(File("../templatesTest/packages")).FullPath },
{ "RestoreConfigFile", MakeAbsolute(File("../templatesTest/nuget.config")).FullPath },
};

foreach (var template in new [] { "maui", "maui-blazor", "mauilib" })
{
var name = template.Replace("-", "") + " Space-Dash";
StartProcess(dn, $"new {template} -o \"./templatesTest/{name}\"");
StartProcess(dn, $"new {template} -o \"../templatesTest/{name}\"");

RunMSBuildWithDotNet($"./templatesTest/{name}", properties);
RunMSBuildWithDotNet($"../templatesTest/{name}", properties);
}
});

Expand Down
5 changes: 5 additions & 0 deletions src/Templates/src/templates/maui-blazor/MauiApp.1.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@

<!-- Required for C# Hot Reload -->
<UseInterpreter Condition="'$(Configuration)' == 'Debug'">True</UseInterpreter>

<SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net6.0-ios'">14.2</SupportedOSPlatformVersion>
mattleibow marked this conversation as resolved.
Show resolved Hide resolved
<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>
</PropertyGroup>

<ItemGroup>
Expand Down
7 changes: 6 additions & 1 deletion src/Templates/src/templates/maui-lib/MauiLib1.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@
<RootNamespace Condition="'$(name)' != '$(name{-VALUE-FORMS-}safe_namespace)'">MauiLib1</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>

<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>
</PropertyGroup>

<ItemGroup Condition="$(TargetFramework.Contains('-windows'))">
<PackageReference Include="Microsoft.WindowsAppSDK" Version="WINDOWSAPPSDK_VERSION" />
</ItemGroup>

</Project>
</Project>
5 changes: 5 additions & 0 deletions src/Templates/src/templates/maui-mobile/MauiApp.1.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@

<!-- Required for C# Hot Reload -->
<UseInterpreter Condition="'$(Configuration)' == 'Debug'">True</UseInterpreter>

<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>
</PropertyGroup>

<ItemGroup>
Expand Down