diff --git a/Directory.Build.props b/Directory.Build.props
index e13d34c71492..6082a37bfc25 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -44,9 +44,9 @@
true
false
- net10.0
-
- net10.0
+
+ net11.0
+ $(NetCurrent)
$(NetCurrent)
$(SdkTargetFramework)
net9.0
diff --git a/build/RunTestsOnHelix.cmd b/build/RunTestsOnHelix.cmd
index 3dc68bb7f8af..2921ad498f44 100644
--- a/build/RunTestsOnHelix.cmd
+++ b/build/RunTestsOnHelix.cmd
@@ -9,6 +9,8 @@ set DOTNET_ROOT=%HELIX_CORRELATION_PAYLOAD%\d
set PATH=%DOTNET_ROOT%;%PATH%
set DOTNET_MULTILEVEL_LOOKUP=0
set TestFullMSBuild=%1
+REM remove once the 11 runtime is in the SDK
+set NETCoreAppMaximumVersion=11.0
REM Ensure Visual Studio instances allow preview SDKs
PowerShell -ExecutionPolicy ByPass -NoProfile -File "%HELIX_CORRELATION_PAYLOAD%\t\eng\enable-preview-sdks.ps1"
diff --git a/build/RunTestsOnHelix.sh b/build/RunTestsOnHelix.sh
index 640138d7d8f7..eba44adf10b8 100644
--- a/build/RunTestsOnHelix.sh
+++ b/build/RunTestsOnHelix.sh
@@ -8,6 +8,8 @@ export NUGET_EXPERIMENTAL_NETWORK_RETRY_DELAY_MILLISECONDS=1000
export MicrosoftNETBuildExtensionsTargets=$HELIX_CORRELATION_PAYLOAD/ex/msbuildExtensions/Microsoft/Microsoft.NET.Build.Extensions/Microsoft.NET.Build.Extensions.targets
export DOTNET_ROOT=$HELIX_CORRELATION_PAYLOAD/d
export PATH=$DOTNET_ROOT:$PATH
+# remove once the 11 runtime is in the SDK
+export NETCoreAppMaximumVersion=11.0
export TestExecutionDirectory=$(realpath "$(mktemp -d "${TMPDIR:-/tmp}"/dotnetSdkTests.XXXXXXXX)")
export DOTNET_CLI_HOME=$TestExecutionDirectory/.dotnet
diff --git a/eng/restore-toolset.ps1 b/eng/restore-toolset.ps1
index 5b3fb632f218..241db8ef418e 100644
--- a/eng/restore-toolset.ps1
+++ b/eng/restore-toolset.ps1
@@ -19,6 +19,7 @@ function InitializeCustomSDKToolset {
InstallDotNetSharedFramework "7.0.0"
InstallDotNetSharedFramework "8.0.0"
InstallDotNetSharedFramework "9.0.0"
+ InstallDotNetSharedFramework "10.0.0"
CreateBuildEnvScripts
CreateVSShortcut
@@ -124,6 +125,7 @@ function InstallDotNetSharedFramework([string]$version) {
if (!(Test-Path $fxDir)) {
$installScript = GetDotNetInstallScript $dotnetRoot
+ $global:lastExitCode = 0
& $installScript -Version $version -InstallDir $dotnetRoot -Runtime "dotnet" -SkipNonVersionedFiles
if($lastExitCode -ne 0) {
diff --git a/eng/restore-toolset.sh b/eng/restore-toolset.sh
index f7ba940aa92f..0a8ef8943979 100755
--- a/eng/restore-toolset.sh
+++ b/eng/restore-toolset.sh
@@ -25,6 +25,7 @@ function InitializeCustomSDKToolset {
InstallDotNetSharedFramework "7.0.0"
InstallDotNetSharedFramework "8.0.0"
InstallDotNetSharedFramework "9.0.0"
+ InstallDotNetSharedFramework "10.0.0"
CreateBuildEnvScript
}
diff --git a/global.json b/global.json
index fecc525db30a..72e411039c4d 100644
--- a/global.json
+++ b/global.json
@@ -7,7 +7,7 @@
"errorMessage": "The .NET SDK is not installed or is not configured correctly. Please run ./build to install the correct SDK version locally."
},
"tools": {
- "dotnet": "10.0.100-rc.1.25451.107",
+ "dotnet": "11.0.100-alpha.1.25614.102",
"runtimes": {
"dotnet": [
"$(MicrosoftNETCorePlatformsPackageVersion)"
diff --git a/src/BlazorWasmSdk/Targets/Microsoft.NET.Sdk.BlazorWebAssembly.5_0.targets b/src/BlazorWasmSdk/Targets/Microsoft.NET.Sdk.BlazorWebAssembly.5_0.targets
index 8a429ecb4f95..61a599017cbe 100644
--- a/src/BlazorWasmSdk/Targets/Microsoft.NET.Sdk.BlazorWebAssembly.5_0.targets
+++ b/src/BlazorWasmSdk/Targets/Microsoft.NET.Sdk.BlazorWebAssembly.5_0.targets
@@ -27,10 +27,10 @@ Copyright (c) .NET Foundation. All rights reserved.
$(MSBuildThisFileDirectory)..\
- <_BlazorWebAssemblySdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">net10.0
+ <_BlazorWebAssemblySdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">$(SdkTargetFramework)
<_BlazorWebAssemblySdkTasksTFM Condition=" '$(MSBuildRuntimeType)' != 'Core'">net472
<_BlazorWebAssemblySdkTasksAssembly>$(BlazorWebAssemblySdkDirectoryRoot)tools\$(_BlazorWebAssemblySdkTasksTFM)\Microsoft.NET.Sdk.BlazorWebAssembly.Tasks.dll
- <_BlazorWebAssemblySdkToolAssembly>$(BlazorWebAssemblySdkDirectoryRoot)tools\net10.0\Microsoft.NET.Sdk.BlazorWebAssembly.Tool.dll
+ <_BlazorWebAssemblySdkToolAssembly>$(BlazorWebAssemblySdkDirectoryRoot)tools\$(SdkTargetFramework)\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 a90625e732e6..ce01111acc57 100644
--- a/src/BlazorWasmSdk/Targets/Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets
+++ b/src/BlazorWasmSdk/Targets/Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets
@@ -27,10 +27,10 @@ Copyright (c) .NET Foundation. All rights reserved.
$(MSBuildThisFileDirectory)..\
- <_BlazorWebAssemblySdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">net10.0
+ <_BlazorWebAssemblySdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">$(SdkTargetFramework)
<_BlazorWebAssemblySdkTasksTFM Condition=" '$(MSBuildRuntimeType)' != 'Core'">net472
<_BlazorWebAssemblySdkTasksAssembly>$(BlazorWebAssemblySdkDirectoryRoot)tools\$(_BlazorWebAssemblySdkTasksTFM)\Microsoft.NET.Sdk.BlazorWebAssembly.Tasks.dll
- <_BlazorWebAssemblySdkToolAssembly>$(BlazorWebAssemblySdkDirectoryRoot)tools\net10.0\Microsoft.NET.Sdk.BlazorWebAssembly.Tool.dll
+ <_BlazorWebAssemblySdkToolAssembly>$(BlazorWebAssemblySdkDirectoryRoot)tools\$(SdkTargetFramework)\Microsoft.NET.Sdk.BlazorWebAssembly.Tool.dll
diff --git a/src/BuiltInTools/Watch/HotReload/HotReloadEventSource.cs b/src/BuiltInTools/Watch/HotReload/HotReloadEventSource.cs
index 04b3dbb70d52..92af26786b5a 100644
--- a/src/BuiltInTools/Watch/HotReload/HotReloadEventSource.cs
+++ b/src/BuiltInTools/Watch/HotReload/HotReloadEventSource.cs
@@ -7,7 +7,7 @@
namespace Microsoft.DotNet.Watch
{
[EventSource(Name = "HotReload")]
- internal sealed class HotReloadEventSource : EventSource
+ internal sealed partial class HotReloadEventSource : EventSource
{
public enum StartType
{
diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/TabularOutput/TabularOutput.cs b/src/Cli/Microsoft.TemplateEngine.Cli/TabularOutput/TabularOutput.cs
index f70889a7043a..7ab182347730 100644
--- a/src/Cli/Microsoft.TemplateEngine.Cli/TabularOutput/TabularOutput.cs
+++ b/src/Cli/Microsoft.TemplateEngine.Cli/TabularOutput/TabularOutput.cs
@@ -128,11 +128,11 @@ internal string Layout(int indent = 0)
{
for (int i = 0; i < _columns.Count; ++i)
{
- b.Append(new string(_settings.HeaderSeparator.Value, _columns[i].CalculatedWidth));
+ b.Append(_settings.HeaderSeparator.Value, _columns[i].CalculatedWidth);
if (i < _columns.Count - 1)
{
- b.Append(new string(' ', _settings.ColumnPadding));
+ b.Append(' ', _settings.ColumnPadding);
}
}
b.AppendLine().Indent(indent);
diff --git a/src/Containers/Microsoft.NET.Build.Containers/PublicAPI/net10.0/PublicAPI.Shipped.txt b/src/Containers/Microsoft.NET.Build.Containers/PublicAPI/net11.0/PublicAPI.Shipped.txt
similarity index 100%
rename from src/Containers/Microsoft.NET.Build.Containers/PublicAPI/net10.0/PublicAPI.Shipped.txt
rename to src/Containers/Microsoft.NET.Build.Containers/PublicAPI/net11.0/PublicAPI.Shipped.txt
diff --git a/src/Containers/Microsoft.NET.Build.Containers/PublicAPI/net10.0/PublicAPI.Unshipped.txt b/src/Containers/Microsoft.NET.Build.Containers/PublicAPI/net11.0/PublicAPI.Unshipped.txt
similarity index 100%
rename from src/Containers/Microsoft.NET.Build.Containers/PublicAPI/net10.0/PublicAPI.Unshipped.txt
rename to src/Containers/Microsoft.NET.Build.Containers/PublicAPI/net11.0/PublicAPI.Unshipped.txt
diff --git a/src/Containers/packaging/build/Microsoft.NET.Build.Containers.props b/src/Containers/packaging/build/Microsoft.NET.Build.Containers.props
index 82178233188c..bad08cf557e8 100644
--- a/src/Containers/packaging/build/Microsoft.NET.Build.Containers.props
+++ b/src/Containers/packaging/build/Microsoft.NET.Build.Containers.props
@@ -3,7 +3,7 @@
true
tasks
- net10.0
+ $(SdkTargetFramework)
net472
containerize
diff --git a/src/Layout/redist/targets/Crossgen.targets b/src/Layout/redist/targets/Crossgen.targets
index 3e07f481af11..a5276b3a3d80 100644
--- a/src/Layout/redist/targets/Crossgen.targets
+++ b/src/Layout/redist/targets/Crossgen.targets
@@ -30,14 +30,14 @@
no that we do not silently miss cross-genning some bits. When a TFM for a tool is updated,
update its path explicitly. If all TFMs match, update DefaultToolTfm -->
- net10.0
+ $(SdkTargetFramework)
$(InstallerOutputDirectory)Sdks\Microsoft.NET.Sdk\analyzers\
$(InstallerOutputDirectory)Sdks\Microsoft.NET.Sdk\tools\$(DefaultToolTfm)\
$(InstallerOutputDirectory)Sdks\Microsoft.NET.Sdk.BlazorWebAssembly\tools\$(DefaultToolTfm)\
$(InstallerOutputDirectory)Sdks\Microsoft.NET.Sdk.Razor\source-generators\
$(InstallerOutputDirectory)Sdks\Microsoft.NET.Sdk.Razor\tasks\$(DefaultToolTfm)\
- $(InstallerOutputDirectory)Sdks\Microsoft.NET.Sdk.WindowsDesktop\tools\$(DefaultToolTfm)\
+ $(InstallerOutputDirectory)Sdks\Microsoft.NET.Sdk.WindowsDesktop\tools\net10.0\
$(InstallerOutputDirectory)Sdks\Microsoft.NET.Sdk.Publish\tools\$(DefaultToolTfm)\
$(InstallerOutputDirectory)Sdks\Microsoft.NET.Sdk.Web\tools\$(DefaultToolTfm)\
$(InstallerOutputDirectory)Sdks\Microsoft.NET.Sdk.Web.ProjectSystem\tools\$(DefaultToolTfm)\
diff --git a/src/RazorSdk/Targets/Sdk.Razor.CurrentVersion.targets b/src/RazorSdk/Targets/Sdk.Razor.CurrentVersion.targets
index 2c5b6daf2d49..0ac15c0ff899 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'">net10.0
+ <_RazorSdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">$(SdkTargetFramework)
<_RazorSdkTasksTFM Condition=" '$(_RazorSdkTasksTFM)' == ''">net472
$(RazorSdkBuildTasksDirectoryRoot)$(_RazorSdkTasksTFM)\Microsoft.NET.Sdk.Razor.Tasks.dll
<_RazorSdkToolAssembly>$(RazorSdkDirectoryRoot)tools\rzc.dll
diff --git a/src/StaticWebAssetsSdk/Targets/Sdk.StaticWebAssets.CurrentVersion.targets b/src/StaticWebAssetsSdk/Targets/Sdk.StaticWebAssets.CurrentVersion.targets
index 37e0d4ed7db3..151c2cd9ac7c 100644
--- a/src/StaticWebAssetsSdk/Targets/Sdk.StaticWebAssets.CurrentVersion.targets
+++ b/src/StaticWebAssetsSdk/Targets/Sdk.StaticWebAssets.CurrentVersion.targets
@@ -28,10 +28,10 @@ Copyright (c) .NET Foundation. All rights reserved.
$(MSBuildThisFileDirectory)..\
$(StaticWebAssetsSdkDirectoryRoot)tasks\
- <_StaticWebAssetsSdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">net10.0
+ <_StaticWebAssetsSdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">$(SdkTargetFramework)
<_StaticWebAssetsSdkTasksTFM Condition=" '$(_StaticWebAssetsSdkTasksTFM)' == ''">net472
$(StaticWebAssetsSdkBuildTasksDirectoryRoot)$(_StaticWebAssetsSdkTasksTFM)\Microsoft.NET.Sdk.StaticWebAssets.Tasks.dll
- <_StaticWebAssetsSdkToolAssembly>$(StaticWebAssetsSdkDirectoryRoot)tools\net10.0\Microsoft.NET.Sdk.StaticWebAssets.Tool.dll
+ <_StaticWebAssetsSdkToolAssembly>$(StaticWebAssetsSdkDirectoryRoot)tools\$(SdkTargetFramework)\Microsoft.NET.Sdk.StaticWebAssets.Tool.dll
diff --git a/src/StaticWebAssetsSdk/benchmarks/Microsoft.NET.Sdk.StaticWebAssets.Benchmarks.csproj b/src/StaticWebAssetsSdk/benchmarks/Microsoft.NET.Sdk.StaticWebAssets.Benchmarks.csproj
index ef7f070f1612..cc4f2ad8efff 100644
--- a/src/StaticWebAssetsSdk/benchmarks/Microsoft.NET.Sdk.StaticWebAssets.Benchmarks.csproj
+++ b/src/StaticWebAssetsSdk/benchmarks/Microsoft.NET.Sdk.StaticWebAssets.Benchmarks.csproj
@@ -1,7 +1,7 @@
Exe
- net10.0;net472
+ $(SdkTargetFramework);net472
Benchmarks for Microsoft.NET.Sdk.StaticWebAssets
Microsoft.NET.Sdk.StaticWebAssets.Benchmarks
false
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 eaff81f14135..1c4d38d0adaf 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\net10.0\Microsoft.NET.Build.Extensions.Tasks.dll
+ $(MSBuildThisFileDirectory)\tools\$(SdkTargetFramework)\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.ApiCompat.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ApiCompat.targets
index 194667dbf7f4..46fa4ea87dea 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ApiCompat.targets
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ApiCompat.targets
@@ -12,7 +12,7 @@ Copyright (c) .NET Foundation. All rights reserved.
$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.DotNet.ApiCompat.Task.dll
- $(MSBuildThisFileDirectory)..\tools\net10.0\Microsoft.DotNet.ApiCompat.Task.dll
+ $(MSBuildThisFileDirectory)..\tools\$(SdkTargetFramework)\Microsoft.DotNet.ApiCompat.Task.dll
net10.0
+ $(SdkTargetFramework)
net472
$(MicrosoftNETBuildTasksDirectoryRoot)$(MicrosoftNETBuildTasksTFM)\
$(MicrosoftNETBuildTasksDirectory)Microsoft.NET.Build.Tasks.dll
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.SupportedTargetFrameworks.props b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.SupportedTargetFrameworks.props
index ff50a590d76c..873efa5eeb18 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.SupportedTargetFrameworks.props
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.SupportedTargetFrameworks.props
@@ -29,6 +29,7 @@ Copyright (c) .NET Foundation. All rights reserved.
+
diff --git a/src/WebSdk/Publish/Targets/Microsoft.NET.Sdk.Publish.targets b/src/WebSdk/Publish/Targets/Microsoft.NET.Sdk.Publish.targets
index c5206449c345..160b45e4d7d6 100644
--- a/src/WebSdk/Publish/Targets/Microsoft.NET.Sdk.Publish.targets
+++ b/src/WebSdk/Publish/Targets/Microsoft.NET.Sdk.Publish.targets
@@ -19,7 +19,7 @@ Copyright (C) Microsoft Corporation. All rights reserved.
true
- <_PublishTaskFramework Condition=" '$(MSBuildRuntimeType)' == 'Core'">net10.0
+ <_PublishTaskFramework Condition=" '$(MSBuildRuntimeType)' == 'Core'">$(SdkTargetFramework)
<_PublishTaskFramework Condition=" '$(_PublishTaskFramework)' == ''">net472
<_PublishTasksDir Condition=" '$(_PublishTasksDir)'=='' ">$(MSBuildThisFileDirectory)..\tools\$(_PublishTaskFramework)\
<_PublishTaskAssemblyFullPath Condition=" '$(_PublishTaskAssemblyFullPath)'=='' ">$(_PublishTasksDir)Microsoft.NET.Sdk.Publish.Tasks.dll
diff --git a/test/EndToEnd.Tests/GivenFrameworkDependentApps.cs b/test/EndToEnd.Tests/GivenFrameworkDependentApps.cs
index f6c1aa250b72..9b42d9cec7d6 100644
--- a/test/EndToEnd.Tests/GivenFrameworkDependentApps.cs
+++ b/test/EndToEnd.Tests/GivenFrameworkDependentApps.cs
@@ -15,7 +15,7 @@ public class GivenFrameworkDependentApps(ITestOutputHelper log) : SdkTest(log)
[ClassData(typeof(SupportedNetCoreAppVersions))]
public void ItDoesNotRollForwardToTheLatestVersionOfNetCore(string minorVersion)
{
- if (minorVersion == "3.0" || minorVersion == "3.1" || minorVersion == "5.0" || minorVersion == "6.0" || minorVersion == "7.0" || minorVersion == "8.0" || minorVersion == "9.0" || minorVersion == "10.0")
+ if (minorVersion == "3.0" || minorVersion == "3.1" || minorVersion == "5.0" || minorVersion == "6.0" || minorVersion == "7.0" || minorVersion == "8.0" || minorVersion == "9.0" || minorVersion == "10.0" || minorVersion == "11.0")
{
// https://github.com/dotnet/core-sdk/issues/621
return;
@@ -27,7 +27,7 @@ public void ItDoesNotRollForwardToTheLatestVersionOfNetCore(string minorVersion)
[ClassData(typeof(SupportedAspNetCoreVersions))]
public void ItDoesNotRollForwardToTheLatestVersionOfAspNetCoreApp(string minorVersion)
{
- if (minorVersion == "3.0" || minorVersion == "3.1" || minorVersion == "5.0" || minorVersion == "6.0" || minorVersion == "7.0" || minorVersion == "8.0" || minorVersion == "9.0" || minorVersion == "10.0")
+ if (minorVersion == "3.0" || minorVersion == "3.1" || minorVersion == "5.0" || minorVersion == "6.0" || minorVersion == "7.0" || minorVersion == "8.0" || minorVersion == "9.0" || minorVersion == "10.0" || minorVersion == "11.0")
{
// https://github.com/dotnet/core-sdk/issues/621
return;
diff --git a/test/EndToEnd.Tests/Utilities/SupportedNetCoreAppVersions.cs b/test/EndToEnd.Tests/Utilities/SupportedNetCoreAppVersions.cs
index a83706124a26..a97c4b445432 100644
--- a/test/EndToEnd.Tests/Utilities/SupportedNetCoreAppVersions.cs
+++ b/test/EndToEnd.Tests/Utilities/SupportedNetCoreAppVersions.cs
@@ -33,7 +33,8 @@ public class SupportedNetCoreAppVersions : IEnumerable