diff --git a/Directory.Build.props b/Directory.Build.props index 1e67701b6183..53577df2bbc4 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -6,6 +6,13 @@ <_MauiDotNetVersionMinor Condition="'$(_MauiDotNetVersionMinor)' == ''">0 <_MauiDotNetVersion Condition="'$(_MauiDotNetVersion)' == ''">$(_MauiDotNetVersionMajor).$(_MauiDotNetVersionMinor) <_MauiDotNetTfm Condition="'$(_MauiDotNetTfm)' == ''">net$(_MauiDotNetVersion) + + <_MauiPreviousDotNetVersionMajor Condition="'$(_MauiPreviousDotNetVersionMajor)' == ''">6 + <_MauiPreviousDotNetVersionMinor Condition="'$(_MauiPreviousDotNetVersionMinor)' == ''">0 + <_MauiPreviousDotNetVersion Condition="'$(_MauiPreviousDotNetVersion)' == ''">$(_MauiPreviousDotNetVersionMajor).$(_MauiPreviousDotNetVersionMinor) + <_MauiPreviousDotNetVersionNoDot Condition="'$(_MauiPreviousDotNetVersionNoDot)' == ''">$(_MauiPreviousDotNetVersionMajor)$(_MauiPreviousDotNetVersionMinor) + <_MauiPreviousDotNetTfm Condition="'$(_MauiPreviousDotNetTfm)' == ''">net$(_MauiPreviousDotNetVersion) + <_MauiTargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) <_MauiNoTargetPlatform Condition="'$(_MauiTargetPlatformIdentifier)' == ''">True <_MauiTargetPlatformIsAndroid Condition="'$(_MauiTargetPlatformIdentifier)' == 'android'">True @@ -18,8 +25,8 @@ true true + Exists('$(DOTNET_ROOT)\sdk-manifests\$(DotNetSdkManifestsFolder)\samsung.net.sdk.tizen\WorkloadManifest.json') or + Exists('$(ProgramFiles)\dotnet\sdk-manifests\$(DotNetSdkManifestsFolder)\samsung.net.sdk.tizen\WorkloadManifest.json')">true diff --git a/eng/Versions.props b/eng/Versions.props index bfc3d74e4542..6e7deb7cfb76 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -1,5 +1,7 @@ + + 6.0.405 7.0.100-preview.6.22316.8 diff --git a/eng/cake/dotnet.cake b/eng/cake/dotnet.cake index afb1a420c480..b670072ed5c8 100644 --- a/eng/cake/dotnet.cake +++ b/eng/cake/dotnet.cake @@ -182,6 +182,21 @@ Task("dotnet-templates") " -->", ""); + // TODO: remove this once issues are fixed + if (TestTFM.StartsWith("net6")) + { + // Mac Catalyst/iOS does not yet support net6 from the net7 SDK. + ReplaceTextInFiles($"{projectName}/*.csproj", + ";net6.0-ios;net6.0-maccatalyst", + ""); + + // Android does not yet support net6 from the net7 SDK in Release builds + if (configuration == "Release") + ReplaceTextInFiles($"{projectName}/*.csproj", + "net6.0-android", + ""); + } + // Build RunMSBuildWithDotNet(projectName, properties, warningsAsError: true, forceDotNetBuild: forceDotNetBuild); diff --git a/eng/pipelines/handlers.yml b/eng/pipelines/handlers.yml index 8533d5e87c86..860514144f30 100644 --- a/eng/pipelines/handlers.yml +++ b/eng/pipelines/handlers.yml @@ -104,8 +104,10 @@ parameters: default: - name: default tfm: default - # - name: net6 - # tfm: net6.0 + - name: net6 + tfm: net6.0 + - name: net7 + tfm: net7.0 resources: repositories: diff --git a/src/Workload/Microsoft.Maui.Sdk/Microsoft.Maui.Sdk.csproj b/src/Workload/Microsoft.Maui.Sdk/Microsoft.Maui.Sdk.csproj index 226b660c3751..fb87f595de0b 100644 --- a/src/Workload/Microsoft.Maui.Sdk/Microsoft.Maui.Sdk.csproj +++ b/src/Workload/Microsoft.Maui.Sdk/Microsoft.Maui.Sdk.csproj @@ -55,6 +55,19 @@ + + <_ValuesToReplace Include="VERSION" PropertyName="PackageReferenceVersion" /> + <_ValuesToReplace Include="TFM" PropertyName="_MauiDotNetTfm" /> + <_ValuesToReplace Include="PREVIOUS_TFM" PropertyName="_MauiPreviousDotNetTfm" /> + <_ValuesToReplace Include="MAUI_DOTNET_VERSION" PropertyName="_MauiDotNetVersion" /> + <_ValuesToReplace Include="MAUI_PREVIOUS_DOTNET_VERSION" PropertyName="_MauiPreviousDotNetVersion" /> + <_ValuesToReplace Include="MAUI_PREVIOUS_DOTNET_VERSION_NO_DOT" PropertyName="_MauiPreviousDotNetVersionNoDot" /> + <_ValuesToReplace Include="MAUI_PREVIOUS_DOTNET_RELEASED_NUGET_VERSION" PropertyName="MicrosoftMauiPreviousDotNetReleasedVersion" /> + <_ValuesToReplace Include="MicrosoftWindowsSDKBuildToolsPackageVersion" PropertyName="MicrosoftWindowsSDKBuildToolsPackageVersion" /> + <_ValuesToReplace Include="MicrosoftExtensionsPackageVersion" PropertyName="MicrosoftExtensionsPackageVersion" /> + <_ValuesToReplace Include="MicrosoftExtensionsServicingPackageVersion" PropertyName="MicrosoftExtensionsServicingPackageVersion" /> + + - - - - + <_MauiRuntimePackVersion>$(MauiVersion) <_MauiRuntimePackVersion Condition=" '$(_MauiRuntimePackVersion)' == '' ">**FromWorkload** @@ -14,7 +15,6 @@ - <_MauiRuntimeIdentifiers Include="android;ios;maccatalyst;win;tizen" /> <_JsonInputFile Include="WorkloadManifest.in.json" OutputPath="$(IntermediateOutputPath)WorkloadManifest.json" Pack="true" /> + <_JsonInputFile Include="WorkloadManifest.in.targets" OutputPath="$(IntermediateOutputPath)WorkloadManifest.targets" Pack="true" /> <_JsonInputFile Include="Rollback.in.json" OutputPath="$(IntermediateOutputPath)Rollback.json" Pack="false" /> <_JsonInputFile Include="SdkInstaller.in.json" OutputPath="$(IntermediateOutputPath)SdkInstaller.json" Pack="false" /> @@ -54,6 +55,12 @@ <_VersionsToReplace Include="MicrosoftMauiGraphicsVersion" /> <_VersionsToReplace Update="@(_VersionsToReplace)" PropertyName="%(Identity)" /> <_VersionsToReplace Include="MicrosoftMauiGraphicsWin2DWinUIDesktopPackageVersion" PropertyName="MicrosoftMauiGraphicsVersion" /> + <_VersionsToReplace Include="MAUI_GRAPHICS_VERSION" PropertyName="MicrosoftMauiGraphicsVersion" /> + <_VersionsToReplace Include="VERSION" PropertyName="PackageReferenceVersion" /> + <_VersionsToReplace Include="MAUI_DOTNET_VERSION" PropertyName="_MauiDotNetVersion" /> + <_VersionsToReplace Include="MAUI_PREVIOUS_DOTNET_VERSION" PropertyName="_MauiPreviousDotNetVersion" /> + <_VersionsToReplace Include="MAUI_PREVIOUS_DOTNET_VERSION_NO_DOT" PropertyName="_MauiPreviousDotNetVersionNoDot" /> + <_VersionsToReplace Include="MAUI_PREVIOUS_DOTNET_RELEASED_NUGET_VERSION" PropertyName="MicrosoftMauiPreviousDotNetReleasedVersion" /> - - - + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Workload/Microsoft.NET.Sdk.Maui/WorkloadManifest.targets b/src/Workload/Microsoft.NET.Sdk.Maui/WorkloadManifest.targets deleted file mode 100644 index 91f9663d8295..000000000000 --- a/src/Workload/Microsoft.NET.Sdk.Maui/WorkloadManifest.targets +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - \ No newline at end of file