Self-contained application for Red Hat 6 - rhel.6-x64 not supported?
From @AlexSanseau on December 14, 2017 12:14
Steps to reproduce
dotnet new console
dotnet publish -c debug -r rhel.6-x64
Expected behavior
Successful compilation: rhel.6-x64 is listed as a valid RID for .NET Core 2.0 and later here: https://github.com/dotnet/docs/blob/master/docs/core/rid-catalog.md
Actual behavior
error : Project is targeting runtime 'rhel.6-x64' but did not resolve any runtime-specific packages for the 'Microsoft.NETCore.App' package. This runtime may not be supported by .NET Core.
(please note dotnet publish -c debug -r rhel.7-x64 is working fine)
Environment data
dotnet --info output:
.NET Command Line Tools (2.0.2)
Product Information: Version: 2.0.2 Commit SHA-1 hash: a04b4bf512
Runtime Environment: OS Name: Windows OS Version: 10.0.15063 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\2.0.2\
Microsoft .NET Core Shared Framework Host
Version : 2.0.0 Build : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d
Copied from original issue: dotnet/cli#8246
This error is coming from M.NC.App itself. Moving this to core-setup for comment.
I'm having the same problem.
@livarcocc The RHEL 6 support was added in 2.0.3. The versions are here. https://www.nuget.org/packages/runtime.rhel.6-x64.Microsoft.NETCore.App/
Is this because the SDK is always implicitly selecting 2.0.0? Do people need to add <TargetFrameworkVersion>2.0.3</TargetFrameworkVersion> or higher to their projects to force the implicit reference higher?
I've now installed the latest version (.NET Core 2.1.3 SDK) from https://www.microsoft.com/net/download/windows.
dotnet --info output:
.NET Command Line Tools (2.1.3)
Product Information:
Version: 2.1.3
Commit SHA-1 hash: a0ca411ca5
Runtime Environment:
OS Name: Windows
OS Version: 6.1.7601
OS Platform: Windows
RID: win7-x64
Base Path: C:\Program Files\dotnet\sdk\2.1.3\
Microsoft .NET Core Shared Framework Host
Version : 2.0.4
Build : 7f262f453d8c8479b9af91d34c013b3aa05bc1ff
I reproduced the same steps:
dotnet new console
dotnet publish -c debug -r rhel.6-x64
but I'm still getting an error:
C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.netcore.app\2.0.0\build\netcoreapp2.0\Microsoft.NETCore.App.targets(19,5): error : Project is targeting runtime 'rhel.6-x64' but did not resolve any runtime-specific packages for the 'Microsoft.NETCore.App' package. This runtime may not be supported by .NET Core. [E:\temp\dotnetcore\console1\console1.csproj]
As @Petermarcu suggested, it could be that the wrong version is being picked up: the target file is located in NuGetFallbackFolder\microsoft.netcore.app\2.0.0 but it should probably be NuGetFallbackFolder\microsoft.netcore.app\2.0.3 or NuGetFallbackFolder\microsoft.netcore.app\2.0.4 (I've got both of them)
I tried adding <TargetFrameworkVersion>2.0.3</TargetFrameworkVersion> to my csproj file, as suggested, but that resulted in a new error message:
C:\Program Files\dotnet\sdk\2.1.3\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.TargetFrameworkInference.targets(135,5): error : The current .NET SDK does not support targeting .NET Core 2.0.3. Either target .NET Core 2.0 or lower, or use a version of the .NET SDK that supports .NET Core 2.0.3.
Have I set this up incorrectly? If you could kindly advise on the next step, that would be much appreciated. Thanks in advance.
can someone please advise resolution for this issue or at least acknowledge if this is a bug and will get fixed in future updates.
For me the issue was resolved after adding <RuntimeFrameworkVersion>2.0.4</RuntimeFrameworkVersion> to my csproj file.
Closing this issue as a duplicate of https://github.com/dotnet/sdk/issues/1570.
The issue linked is tracking rolling forward the self-contained app runtime version in the same way we do for the portable app.