diff --git a/Directory.Build.targets b/Directory.Build.targets index 7b91dbe458ce..05479d7d159d 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -45,8 +45,4 @@ RuntimeFrameworkVersion="$(MicrosoftNETCoreAppRuntimePackageVersion)" /> - - - - diff --git a/global.json b/global.json index 3bcf95a62121..2525277da4d7 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "6.0.100-preview.6.21301.1", + "dotnet": "6.0.100-preview.7.21356.4", "runtimes": { "dotnet": [ "$(VSRedistCommonNetCoreSharedFrameworkx6460PackageVersion)" diff --git a/src/Layout/redist/redist.csproj b/src/Layout/redist/redist.csproj index 978780ae5dc2..a7c7fdbb7ea4 100644 --- a/src/Layout/redist/redist.csproj +++ b/src/Layout/redist/redist.csproj @@ -11,9 +11,7 @@ false - - - + diff --git a/src/Layout/redist/targets/BuildToolsetTasks.targets b/src/Layout/redist/targets/BuildToolsetTasks.targets index 1a48d262cb1d..f69982ea08fc 100644 --- a/src/Layout/redist/targets/BuildToolsetTasks.targets +++ b/src/Layout/redist/targets/BuildToolsetTasks.targets @@ -4,20 +4,12 @@ $(SdkTargetFramework) net472 - - $(ArtifactsDir)bin\toolset-tasks\$(Configuration)\$(TaskTargetFramework)\toolset-tasks.dll + $(ArtifactsDir)tasks\bin\toolset-tasks\$(Configuration)\$(TaskTargetFramework)\toolset-tasks.dll $(RepoRoot)src\Layout\toolset-tasks\toolset-tasks.csproj - - - - - - - - --> + @@ -34,20 +26,5 @@ - - - - - - - - - diff --git a/src/Layout/toolset-tasks/AddBaseFrameworkToRuntimeConfig.cs b/src/Layout/toolset-tasks/AddBaseFrameworkToRuntimeConfig.cs deleted file mode 100644 index f4b8b78dc8a9..000000000000 --- a/src/Layout/toolset-tasks/AddBaseFrameworkToRuntimeConfig.cs +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// - -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using Microsoft.NET.Build.Tasks; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace Microsoft.DotNet.Build.Tasks -{ - public sealed class AddBaseFrameworkToRuntimeConfig : Task - { - [Required] - public string RuntimeConfigPath { get; set; } - - [Required] - public string MicrosoftNetCoreAppVersion { get; set; } - - public override bool Execute() - { - JsonSerializer serializer = new JsonSerializer(); - serializer.ContractResolver = new CamelCasePropertyNamesContractResolver(); - serializer.Formatting = Formatting.Indented; - serializer.DefaultValueHandling = DefaultValueHandling.Ignore; - - RuntimeConfig runtimeConfig; - using (var sr = new StreamReader(RuntimeConfigPath)) - { - runtimeConfig = serializer.Deserialize(new JsonTextReader(sr)); - } - - IEnumerable currentFrameworks = runtimeConfig.RuntimeOptions.Frameworks ?? Enumerable.Empty(); - if (runtimeConfig.RuntimeOptions.Framework != null) - { - currentFrameworks = currentFrameworks.Prepend(runtimeConfig.RuntimeOptions.Framework); - } - - if (!currentFrameworks.Any(f => f.Name.Equals("Microsoft.NETCore.App", StringComparison.OrdinalIgnoreCase))) - { - var newFrameworks = currentFrameworks.Prepend(new RuntimeConfigFramework() - { - Name = "Microsoft.NETCore.App", - Version = MicrosoftNetCoreAppVersion - }); - - runtimeConfig.RuntimeOptions.Framework = null; - runtimeConfig.RuntimeOptions.Frameworks = newFrameworks.ToList(); - - using (JsonTextWriter writer = new JsonTextWriter(new StreamWriter(File.Create(RuntimeConfigPath)))) - { - serializer.Serialize(writer, runtimeConfig); - } - } - - return true; - } - } -} diff --git a/src/Layout/toolset-tasks/toolset-tasks.csproj b/src/Layout/toolset-tasks/toolset-tasks.csproj index 79bdaa69e5b7..b7ab9f2b9c52 100644 --- a/src/Layout/toolset-tasks/toolset-tasks.csproj +++ b/src/Layout/toolset-tasks/toolset-tasks.csproj @@ -3,7 +3,6 @@ $(SdkTargetFramework);net472 $(SdkTargetFramework) true - Microsoft.DotNet.Build.Tasks @@ -14,12 +13,6 @@ - - - - - - diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs index 4d4deb82fae1..6ccebf8b3773 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs @@ -164,6 +164,8 @@ public void It_builds_successfully_when_targeting_net_framework() var project = XDocument.Load(projFile); var ns = project.Root.Name.Namespace; project.Root.Elements(ns + "PropertyGroup").Elements(ns + "TargetFramework").Single().Value = "net472"; + // The template sets Nullable to "enable", which isn't supported on .NET Framework + project.Root.Elements(ns + "PropertyGroup").Elements(ns + "Nullable").Remove(); project.Save(projFile); var buildCommand = new BuildCommand(Log, testDirectory);