Add netcoreapp5.0 support to bundled versions

* Use 3.0-preview7 when targeting netcoreapp3.0 with 5.0 SDK for now
* Update known app host packs and framework references to 5.0
* Remove workaround for fixed bug from tests
* Temporarily expect run failure while templates are still at 3.0
This commit is contained in:
Nick Guerrera 2019-08-02 22:09:56 -07:00
parent 1520d026ee
commit ac2000cc03
2 changed files with 70 additions and 28 deletions

View file

@ -182,7 +182,7 @@ Copyright (c) .NET Foundation. All rights reserved.
')
<KnownFrameworkReference Include="Microsoft.NETCore.App"
TargetFramework="netcoreapp3.0"
TargetFramework="netcoreapp5.0"
RuntimeFrameworkName="Microsoft.NETCore.App"
DefaultRuntimeFrameworkVersion="$(_NETCoreAppPackageVersion)"
LatestRuntimeFrameworkVersion="$(_NETCoreAppPackageVersion)"
@ -194,14 +194,14 @@ Copyright (c) .NET Foundation. All rights reserved.
/>
<KnownAppHostPack Include="Microsoft.NETCore.App"
TargetFramework="netcoreapp3.0"
TargetFramework="netcoreapp5.0"
AppHostPackNamePattern="Microsoft.NETCore.App.Host.**RID**"
AppHostPackVersion="$(_NETCoreAppPackageVersion)"
AppHostRuntimeIdentifiers="@(NetCoreRuntimePackRids, '%3B')"
/>
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App"
TargetFramework="netcoreapp3.0"
TargetFramework="netcoreapp5.0"
RuntimeFrameworkName="Microsoft.WindowsDesktop.App"
DefaultRuntimeFrameworkVersion="$(MicrosoftWindowsDesktopPackageVersion)"
LatestRuntimeFrameworkVersion="$(MicrosoftWindowsDesktopPackageVersion)"
@ -213,7 +213,7 @@ Copyright (c) .NET Foundation. All rights reserved.
/>
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App.WPF"
TargetFramework="netcoreapp3.0"
TargetFramework="netcoreapp5.0"
RuntimeFrameworkName="Microsoft.WindowsDesktop.App"
DefaultRuntimeFrameworkVersion="$(MicrosoftWindowsDesktopPackageVersion)"
LatestRuntimeFrameworkVersion="$(MicrosoftWindowsDesktopPackageVersion)"
@ -226,7 +226,7 @@ Copyright (c) .NET Foundation. All rights reserved.
/>
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App.WindowsForms"
TargetFramework="netcoreapp3.0"
TargetFramework="netcoreapp5.0"
RuntimeFrameworkName="Microsoft.WindowsDesktop.App"
DefaultRuntimeFrameworkVersion="$(MicrosoftWindowsDesktopPackageVersion)"
LatestRuntimeFrameworkVersion="$(MicrosoftWindowsDesktopPackageVersion)"
@ -249,12 +249,69 @@ Copyright (c) .NET Foundation. All rights reserved.
RuntimePackRuntimeIdentifiers="@(AspNetCoreRuntimePackRids, '%3B')"
/>
<KnownFrameworkReference Include="NETStandard.Library"
<KnownFrameworkReference Include="NETStandard.Library"
TargetFramework="netstandard2.1"
TargetingPackName="NETStandard.Library.Ref"
TargetingPackVersion="$(NETStandardLibraryRefPackageVersion)"
/>
<!-- Use 3.0-preview7 while targeting 3.0 using a 5.0-alpha SDK for now.-->
<KnownFrameworkReference Include="Microsoft.NETCore.App"
TargetFramework="netcoreapp3.0"
RuntimeFrameworkName="Microsoft.NETCore.App"
DefaultRuntimeFrameworkVersion="3.0.0-preview7-27912-14"
LatestRuntimeFrameworkVersion="3.0.0-preview7-27912-14"
TargetingPackName="Microsoft.NETCore.App.Ref"
TargetingPackVersion="3.0.0-preview7-27912-14"
RuntimePackNamePatterns="Microsoft.NETCore.App.Runtime.**RID**"
RuntimePackRuntimeIdentifiers="@(NetCoreRuntimePackRids, '%3B')"
IsTrimmable="true"
/>
<KnownAppHostPack Include="Microsoft.NETCore.App"
TargetFramework="netcoreapp3.0"
AppHostPackNamePattern="Microsoft.NETCore.App.Host.**RID**"
AppHostPackVersion="3.0.0-preview7-27912-14"
AppHostRuntimeIdentifiers="@(NetCoreRuntimePackRids, '%3B')"
/>
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App"
TargetFramework="netcoreapp3.0"
RuntimeFrameworkName="Microsoft.WindowsDesktop.App"
DefaultRuntimeFrameworkVersion="3.0.0-preview7-27912-14"
LatestRuntimeFrameworkVersion="3.0.0-preview7-27912-14"
TargetingPackName="Microsoft.WindowsDesktop.App.Ref"
TargetingPackVersion="3.0.0-preview7-27912-14"
RuntimePackNamePatterns="Microsoft.WindowsDesktop.App.Runtime.**RID**"
RuntimePackRuntimeIdentifiers="@(WindowsDesktopRuntimePackRids, '%3B')"
IsWindowsOnly="true"
/>
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App.WPF"
TargetFramework="netcoreapp3.0"
RuntimeFrameworkName="Microsoft.WindowsDesktop.App"
DefaultRuntimeFrameworkVersion="3.0.0-preview7-27912-14"
LatestRuntimeFrameworkVersion="3.0.0-preview7-27912-14"
TargetingPackName="Microsoft.WindowsDesktop.App.Ref"
TargetingPackVersion="3.0.0-preview7-27912-14"
RuntimePackNamePatterns="Microsoft.WindowsDesktop.App.Runtime.**RID**"
RuntimePackRuntimeIdentifiers="@(WindowsDesktopRuntimePackRids, '%3B')"
IsWindowsOnly="true"
Profile="WPF"
/>
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App.WindowsForms"
TargetFramework="netcoreapp3.0"
RuntimeFrameworkName="Microsoft.WindowsDesktop.App"
DefaultRuntimeFrameworkVersion="3.0.0-preview7-27912-14"
LatestRuntimeFrameworkVersion="3.0.0-preview7-27912-14"
TargetingPackName="Microsoft.WindowsDesktop.App.Ref"
TargetingPackVersion="3.0.0-preview7-27912-14"
RuntimePackNamePatterns="Microsoft.WindowsDesktop.App.Runtime.**RID**"
RuntimePackRuntimeIdentifiers="@(WindowsDesktopRuntimePackRids, '%3B')"
IsWindowsOnly="true"
Profile="WindowsForms"
/>
</ItemGroup>
</Project>
]]>

View file

@ -37,18 +37,10 @@ namespace EndToEnd.Tests
var runCommand = new RunCommand()
.WithWorkingDirectory(projectDirectory);
// Set DOTNET_ROOT as workaround for https://github.com/dotnet/cli/issues/10196
var dotnetRoot = Path.GetDirectoryName(RepoDirectoriesProvider.DotnetUnderTest);
if (!string.IsNullOrEmpty(dotnetRoot))
{
bool useX86 = RepoDirectoriesProvider.DotnetRidUnderTest.EndsWith("x86", StringComparison.InvariantCultureIgnoreCase);
runCommand = runCommand.WithEnvironmentVariable(useX86 ? "DOTNET_ROOT(x86)" : "DOTNET_ROOT",
dotnetRoot);
}
runCommand.ExecuteWithCapturedOutput()
.Should().Pass()
.And.HaveStdOutContaining("Hello World!");
// Templates are still at 3.0 and will not run on 5.0, revert to commented out assertion when 5.0 templates land
//.Should().Pass().And.HaveStdOutContaining("Hello World!");
.Should().Fail().And.HaveStdErrContaining("https://aka.ms/dotnet-download");
var binDirectory = new DirectoryInfo(projectDirectory).Sub("bin");
binDirectory.Should().HaveFilesMatching("*.dll", SearchOption.AllDirectories);
@ -90,18 +82,11 @@ namespace EndToEnd.Tests
var runCommand = new RunCommand()
.WithWorkingDirectory(projectDirectory);
// Set DOTNET_ROOT as workaround for https://github.com/dotnet/cli/issues/10196
var dotnetRoot = Path.GetDirectoryName(RepoDirectoriesProvider.DotnetUnderTest);
if (!string.IsNullOrEmpty(dotnetRoot))
{
bool useX86 = RepoDirectoriesProvider.DotnetRidUnderTest.EndsWith("x86", StringComparison.InvariantCultureIgnoreCase);
runCommand = runCommand.WithEnvironmentVariable(useX86 ? "DOTNET_ROOT(x86)" : "DOTNET_ROOT",
dotnetRoot);
}
runCommand.ExecuteWithCapturedOutput()
.Should().Pass()
.And.HaveStdOutContaining("Hello World!");
// Templates are still at 3.0 and will not run on 5.0, revert to commented out assertion when 5.0 templates land
//.Should().Pass().And.HaveStdOutContaining("Hello World!");
.Should().Fail().And.HaveStdErrContaining("https://aka.ms/dotnet-download");
}