diff --git a/Directory.Build.props b/Directory.Build.props
index 6195cd336df4..01df765884d4 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -11,7 +11,7 @@
true
false
- net7.0
+ net8.0
$(SdkTargetFramework)
$(MSBuildThisFileDirectory)..\
- <_BlazorWebAssemblySdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">net7.0
+ <_BlazorWebAssemblySdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">net8.0
<_BlazorWebAssemblySdkTasksTFM Condition=" '$(MSBuildRuntimeType)' != 'Core'">net472
<_BlazorWebAssemblySdkTasksAssembly>$(BlazorWebAssemblySdkDirectoryRoot)tools\$(_BlazorWebAssemblySdkTasksTFM)\Microsoft.NET.Sdk.BlazorWebAssembly.Tasks.dll
- <_BlazorWebAssemblySdkToolAssembly>$(BlazorWebAssemblySdkDirectoryRoot)tools\net7.0\Microsoft.NET.Sdk.BlazorWebAssembly.Tool.dll
+ <_BlazorWebAssemblySdkToolAssembly>$(BlazorWebAssemblySdkDirectoryRoot)tools\net8.0\Microsoft.NET.Sdk.BlazorWebAssembly.Tool.dll
diff --git a/src/BlazorWasmSdk/Targets/Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets b/src/BlazorWasmSdk/Targets/Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets
index 7e3dee3c110c..437a3c4aafc0 100644
--- a/src/BlazorWasmSdk/Targets/Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets
+++ b/src/BlazorWasmSdk/Targets/Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets
@@ -22,10 +22,10 @@ Copyright (c) .NET Foundation. All rights reserved.
$(MSBuildThisFileDirectory)..\
- <_BlazorWebAssemblySdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">net7.0
+ <_BlazorWebAssemblySdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">net8.0
<_BlazorWebAssemblySdkTasksTFM Condition=" '$(MSBuildRuntimeType)' != 'Core'">net472
<_BlazorWebAssemblySdkTasksAssembly>$(BlazorWebAssemblySdkDirectoryRoot)tools\$(_BlazorWebAssemblySdkTasksTFM)\Microsoft.NET.Sdk.BlazorWebAssembly.Tasks.dll
- <_BlazorWebAssemblySdkToolAssembly>$(BlazorWebAssemblySdkDirectoryRoot)tools\net7.0\Microsoft.NET.Sdk.BlazorWebAssembly.Tool.dll
+ <_BlazorWebAssemblySdkToolAssembly>$(BlazorWebAssemblySdkDirectoryRoot)tools\net8.0\Microsoft.NET.Sdk.BlazorWebAssembly.Tool.dll
diff --git a/src/RazorSdk/Targets/Sdk.Razor.CurrentVersion.targets b/src/RazorSdk/Targets/Sdk.Razor.CurrentVersion.targets
index 3d2f6f391b22..1528ef7ea436 100644
--- a/src/RazorSdk/Targets/Sdk.Razor.CurrentVersion.targets
+++ b/src/RazorSdk/Targets/Sdk.Razor.CurrentVersion.targets
@@ -30,7 +30,7 @@ Copyright (c) .NET Foundation. All rights reserved.
$(MSBuildThisFileDirectory)..\
$(RazorSdkDirectoryRoot)tasks\
- <_RazorSdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">net7.0
+ <_RazorSdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">net8.0
<_RazorSdkTasksTFM Condition=" '$(_RazorSdkTasksTFM)' == ''">net472
$(RazorSdkBuildTasksDirectoryRoot)$(_RazorSdkTasksTFM)\Microsoft.NET.Sdk.Razor.Tasks.dll
<_RazorSdkToolAssembly>$(RazorSdkDirectoryRoot)tools\rzc.dll
diff --git a/src/Tasks/Microsoft.NET.Build.Extensions.Tasks/msbuildExtensions/Microsoft/Microsoft.NET.Build.Extensions/Microsoft.NET.Build.Extensions.targets b/src/Tasks/Microsoft.NET.Build.Extensions.Tasks/msbuildExtensions/Microsoft/Microsoft.NET.Build.Extensions/Microsoft.NET.Build.Extensions.targets
index 8fcf94540080..95ba0706d4c4 100644
--- a/src/Tasks/Microsoft.NET.Build.Extensions.Tasks/msbuildExtensions/Microsoft/Microsoft.NET.Build.Extensions/Microsoft.NET.Build.Extensions.targets
+++ b/src/Tasks/Microsoft.NET.Build.Extensions.Tasks/msbuildExtensions/Microsoft/Microsoft.NET.Build.Extensions/Microsoft.NET.Build.Extensions.targets
@@ -14,7 +14,7 @@ Copyright (c) .NET Foundation. All rights reserved.
<_TargetFrameworkVersionWithoutV>$(TargetFrameworkVersion.TrimStart('vV'))
- $(MSBuildThisFileDirectory)\tools\net7.0\Microsoft.NET.Build.Extensions.Tasks.dll
+ $(MSBuildThisFileDirectory)\tools\net8.0\Microsoft.NET.Build.Extensions.Tasks.dll
$(MSBuildThisFileDirectory)\tools\net472\Microsoft.NET.Build.Extensions.Tasks.dll
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.BeforeCommon.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.BeforeCommon.targets
index 6bb5e58f3aff..899ef846b2b8 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.BeforeCommon.targets
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.BeforeCommon.targets
@@ -225,7 +225,7 @@ Copyright (c) .NET Foundation. All rights reserved.
Condition=" '$(DisableImplicitFrameworkDefines)' != 'true' and '$(TargetPlatformIdentifier)' != '' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 5.0)) " >
<_SupportedPlatformCompatibleVersions Include="@(SdkSupportedTargetPlatformVersion)" Condition=" %(Identity) != '' and $([MSBuild]::VersionLessThanOrEquals(%(Identity), $(TargetPlatformVersion))) " />
- <_ImplicitDefineConstant Include="@(_SupportedPlatformCompatibleVersions->'$(TargetPlatformIdentifier.ToUpper())%(Identity)_OR_GREATER'->Replace('.', '_'))" />
+ <_ImplicitDefineConstant Include="@(_SupportedPlatformCompatibleVersions->Distinct()->'$(TargetPlatformIdentifier.ToUpper())%(Identity)_OR_GREATER'->Replace('.', '_'))" />
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.Common.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.Common.targets
index 63804b179a99..31b6c4cb5c8a 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.Common.targets
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.Common.targets
@@ -15,7 +15,7 @@ Copyright (c) .NET Foundation. All rights reserved.
$(MSBuildThisFileDirectory)..\tools\
- net7.0
+ net8.0
net472
$(MicrosoftNETBuildTasksDirectoryRoot)$(MicrosoftNETBuildTasksTFM)\
$(MicrosoftNETBuildTasksDirectory)Microsoft.NET.Build.Tasks.dll
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs
index 679c7047c76c..d45edd463e2c 100644
--- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs
+++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs
@@ -193,7 +193,7 @@ public void It_fails_if_windows_target_platform_version_is_invalid()
.HaveStdOutContaining("NETSDK1140");
}
- [WindowsOnlyTheory]
+ [WindowsOnlyTheory(Skip="https://github.com/dotnet/sdk/pull/29009")]
[InlineData(true)]
[InlineData(false)]
public void It_succeeds_if_windows_target_platform_version_does_not_have_trailing_zeros(bool setInTargetframework)
diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToControlGeneratedAssemblyInfo.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToControlGeneratedAssemblyInfo.cs
index 3ba7af9fa07a..ca2cf2a869d3 100644
--- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToControlGeneratedAssemblyInfo.cs
+++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToControlGeneratedAssemblyInfo.cs
@@ -370,9 +370,9 @@ public void It_includes_internals_visible_to()
[RequiresMSBuildVersionTheory("17.0.0.32901")]
[InlineData(true, true, "net5.0")]
- [InlineData(true, true, ToolsetInfo.CurrentTargetFramework)]
- [InlineData(true, false, ToolsetInfo.CurrentTargetFramework)]
- [InlineData(false, false, ToolsetInfo.CurrentTargetFramework)]
+ [InlineData(true, true, ToolsetInfo.NextTargetFramework)]
+ [InlineData(true, false, ToolsetInfo.NextTargetFramework)]
+ [InlineData(false, false, ToolsetInfo.NextTargetFramework)]
public void TestPreviewFeatures(bool enablePreviewFeatures, bool generateRequiresPreviewFeaturesAttribute, string targetFramework)
{
var testAsset = _testAssetsManager
@@ -419,7 +419,7 @@ public void TestPreviewFeatures(bool enablePreviewFeatures, bool generateRequire
if (enablePreviewFeatures && generateRequiresPreviewFeaturesAttribute)
{
- if (targetFramework == ToolsetInfo.CurrentTargetFramework)
+ if (targetFramework == ToolsetInfo.NextTargetFramework)
{
Assert.Equal("Preview", langVersion);
Assert.True(contains);
diff --git a/src/Tests/Microsoft.NET.Build.Tests/ReferenceExeTests.cs b/src/Tests/Microsoft.NET.Build.Tests/ReferenceExeTests.cs
index 940b231fa79e..d7f2521b4dad 100644
--- a/src/Tests/Microsoft.NET.Build.Tests/ReferenceExeTests.cs
+++ b/src/Tests/Microsoft.NET.Build.Tests/ReferenceExeTests.cs
@@ -342,7 +342,7 @@ public void ExeProjectCanReferenceTestProject(string testTemplateName)
var testConsoleProject = new TestProject("ConsoleApp")
{
IsExe = true,
- TargetFrameworks = ToolsetInfo.CurrentTargetFramework,
+ TargetFrameworks = ToolsetInfo.NextTargetFramework,
RuntimeIdentifier = EnvironmentInfo.GetCompatibleRid()
};
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/PublishTestUtils.cs b/src/Tests/Microsoft.NET.Publish.Tests/PublishTestUtils.cs
index 56af8cf04d9f..1539c70cdc9e 100644
--- a/src/Tests/Microsoft.NET.Publish.Tests/PublishTestUtils.cs
+++ b/src/Tests/Microsoft.NET.Publish.Tests/PublishTestUtils.cs
@@ -9,14 +9,15 @@ namespace Microsoft.NET.Publish.Tests
{
internal static class PublishTestUtils
{
-#if NET7_0
+#if NET8_0
public static IEnumerable