diff --git a/TestAssets/TestProjects/UseCswinrt/consolecswinrt.csproj b/TestAssets/TestProjects/UseCswinrt/consolecswinrt.csproj index 9fcbef4ce..85367b5e2 100644 --- a/TestAssets/TestProjects/UseCswinrt/consolecswinrt.csproj +++ b/TestAssets/TestProjects/UseCswinrt/consolecswinrt.csproj @@ -1,7 +1,7 @@ Exe - net5.0 + net6.0 Windows diff --git a/src/redist/targets/GenerateBundledVersions.targets b/src/redist/targets/GenerateBundledVersions.targets index 7cca46584..52b8a8411 100644 --- a/src/redist/targets/GenerateBundledVersions.targets +++ b/src/redist/targets/GenerateBundledVersions.targets @@ -28,24 +28,32 @@ <_NETStandardLibraryPackageVersion>$(NETStandardLibraryRefPackageVersion) <_NETCorePlatformsPackageVersion>$(MicrosoftNETCorePlatformsPackageVersion) - <_NETCoreApp30RuntimePackVersion>3.0.3 - <_NETCoreApp30TargetingPackVersion>3.0.0 - + + <_NET50DefaultRuntimeFrameworkVersion>5.0.0-rc.2.20475.5 + <_NET50RuntimePackVersion>5.0.0-rc.2.20475.5 + <_NET50TargetingPackVersion>5.0.0-rc.2.20475.5 + <_WindowsDesktop50DefaultRuntimeFrameworkVersion>5.0.0-rc.2.20475.6 + <_WindowsDesktop50RuntimePackVersion>5.0.0-rc.2.20475.6 + <_WindowsDesktop50TargetingPackVersion>5.0.0-rc.2.20475.6 + <_AspNet50DefaultRuntimeFrameworkVersion>5.0.0-rc.2.20475.17 + <_AspNet50RuntimePackVersion>5.0.0-rc.2.20475.17 + <_AspNet50TargetingPackVersion>5.0.0-rc.2.20475.17 + <_NETCoreApp31RuntimePackVersion>3.1.7 <_NETCoreApp31TargetingPackVersion>3.1.0 - - <_WindowsDesktop30RuntimePackVersion>3.0.3 - <_WindowsDesktop30TargetingPackVersion>3.0.0 - <_WindowsDesktop31RuntimePackVersion>3.1.2 <_WindowsDesktop31TargetingPackVersion>3.1.0 - - <_AspNet30RuntimePackVersion>3.0.3 - <_AspNet30TargetingPackVersion>3.0.1 - <_AspNet31RuntimePackVersion>3.1.9 <_AspNet31TargetingPackVersion>3.1.8 + <_NETCoreApp30RuntimePackVersion>3.0.3 + <_NETCoreApp30TargetingPackVersion>3.0.0 + <_WindowsDesktop30RuntimePackVersion>3.0.3 + <_WindowsDesktop30TargetingPackVersion>3.0.0 + <_AspNet30RuntimePackVersion>3.0.3 + <_AspNet30TargetingPackVersion>3.0.1 + <_NETCoreAppTargetFrameworkVersion>$(_NETCoreAppPackageVersion.Split('.')[0]).$(_NETCoreAppPackageVersion.Split('.')[1]) <_NETStandardTargetFrameworkVersion>$(_NETStandardLibraryPackageVersion.Split('.')[0]).$(_NETStandardLibraryPackageVersion.Split('.')[1]) @@ -73,10 +81,10 @@ - + - - - + + - + + @@ -113,7 +122,8 @@ - + + @@ -206,8 +216,9 @@ Copyright (c) .NET Foundation. All rights reserved. @(ImplicitPackageVariable->'', ' ') + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/EndToEnd/GivenWeWantToRequireWindowsForDesktopApps.cs b/test/EndToEnd/GivenWeWantToRequireWindowsForDesktopApps.cs index f6d55f644..1b92a3b9f 100644 --- a/test/EndToEnd/GivenWeWantToRequireWindowsForDesktopApps.cs +++ b/test/EndToEnd/GivenWeWantToRequireWindowsForDesktopApps.cs @@ -17,7 +17,7 @@ namespace Microsoft.DotNet.Tests.EndToEnd { var testProjectCreator = new TestProjectCreator() { - MinorVersion = "5.0" + MinorVersion = "6.0" }; testProjectCreator.AdditionalProperties["RestorePackagesPath"] = @"$(MSBuildProjectDirectory)\packages"; diff --git a/test/EndToEnd/GivenWindows50App.cs b/test/EndToEnd/GivenWindowsApp.cs similarity index 97% rename from test/EndToEnd/GivenWindows50App.cs rename to test/EndToEnd/GivenWindowsApp.cs index 51a814fe7..8072ae3b3 100644 --- a/test/EndToEnd/GivenWindows50App.cs +++ b/test/EndToEnd/GivenWindowsApp.cs @@ -10,7 +10,7 @@ using Xunit; namespace EndToEnd { - public class GivenWindows50App : TestBase + public class GivenWindowsApp : TestBase { [WindowsOnlyTheory] [InlineData("10.0.17763.0")] diff --git a/test/EndToEnd/ProjectBuildTests.cs b/test/EndToEnd/ProjectBuildTests.cs index 97293638a..190894fbb 100644 --- a/test/EndToEnd/ProjectBuildTests.cs +++ b/test/EndToEnd/ProjectBuildTests.cs @@ -13,6 +13,21 @@ namespace EndToEnd.Tests { public class ProjectBuildTests : TestBase { + // TODO: Once console template is updated to target net6.0, remove this logic + // https://github.com/dotnet/installer/issues/8974 + void RetargetProject(string projectDirectory) + { + var projectFile = Directory.GetFiles(projectDirectory, "*.csproj").Single(); + + var projectXml = XDocument.Load(projectFile); + var ns = projectXml.Root.Name.Namespace; + + projectXml.Root.Element(ns + "PropertyGroup") + .Element(ns + "TargetFramework").Value = "net6.0"; + + projectXml.Save(projectFile); + } + [Fact] public void ItCanNewRestoreBuildRunCleanMSBuildProject() { @@ -25,6 +40,8 @@ namespace EndToEnd.Tests .Execute(newArgs) .Should().Pass(); + RetargetProject(projectDirectory); + new RestoreCommand() .WithWorkingDirectory(projectDirectory) .Execute() @@ -63,6 +80,8 @@ namespace EndToEnd.Tests .Execute(newArgs) .Should().Pass(); + RetargetProject(projectDirectory); + string projectPath = Path.Combine(projectDirectory, directory.Name + ".csproj"); var project = XDocument.Load(projectPath);