runtime icon indicating copy to clipboard operation
runtime copied to clipboard

Self-contained application for Red Hat 6 - rhel.6-x64 not supported?

Open livarcocc opened this issue 8 years ago • 7 comments

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

livarcocc avatar Dec 14 '17 17:12 livarcocc

This error is coming from M.NC.App itself. Moving this to core-setup for comment.

livarcocc avatar Dec 14 '17 17:12 livarcocc

I'm having the same problem.

szehetner avatar Dec 21 '17 08:12 szehetner

@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?

Petermarcu avatar Dec 21 '17 14:12 Petermarcu

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.

AlexSanseau avatar Jan 03 '18 15:01 AlexSanseau

can someone please advise resolution for this issue or at least acknowledge if this is a bug and will get fixed in future updates.

AmeetShinde avatar Jan 31 '18 10:01 AmeetShinde

For me the issue was resolved after adding <RuntimeFrameworkVersion>2.0.4</RuntimeFrameworkVersion> to my csproj file.

szehetner avatar Jan 31 '18 13:01 szehetner

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.

livarcocc avatar Feb 05 '18 18:02 livarcocc