Questions tagged [runtime-identifier]

Runtime Identifier (RID) values are used to identify target platforms where an application will run. They're used by .NET packages to represent platform-specific assets in NuGet packages.

From the .NET Core Runtime Identifier (RID) Catalog:

Runtime Identifier (RID) values are used to identify target platforms where an application will run. They're used by .NET packages to represent platform-specific assets in NuGet packages. The following values are examples of RIDs: linux-x64, ubuntu.14.04-x64, win7-x64, or osx.10.12-x64.

RIDs that represent concrete operating systems usually follow this pattern: [os].[version]-[architecture]-[additional qualifiers].

11 questions
39
votes
3 answers

What does the win/any runtime mean in .NET Core

I'm building a C# .NET core application and it is targeting the net452 framework. When I publish I can specify a runtime (--runtime), if I don't specify any runtime it uses win7-x64 (I assume that is because that is what my machine is running). …
Pace
  • 33,215
  • 10
  • 99
  • 130
28
votes
2 answers

.NET Core RuntimeIdentifier vs TargetFramework

Can someone explain the purpose of this two in csproj file (VS2017): netstandard1.6 win7 I just migrated from VS2015 and now can't publish my web api because it looks I…
8
votes
1 answer

When publishing how do I target specific .NET Core Runtimes?

When I publish my .NET Core app, it outputs a runtimes directory with the following sub-directories: - publish/runtimes/ - debian.8-x64/ - fedora.23-x64/ - fedora.24-x64/ - opensuse.13.2-x64/ - opensuse.42.1-x64/ - osx/ -…
Nick
  • 899
  • 1
  • 13
  • 26
6
votes
1 answer

Can I define constants based on the runtime identifier in .NET Core?

I have a .NET Core Console application. My goal here is to be able to conditionally DLLImport a function and call it, but only on Windows runtimes. I thought maybe if I could access the runtime identifier in the csproj file, I could conditionally…
mrdrbob
  • 674
  • 1
  • 7
  • 14
4
votes
1 answer

VS 2017 .NET 4.6.2 new ASP.NET Core Web Application (.NET Framework) defaults to x86 platform

Why? Web Application (.NET Framework) and Core Web Application (.NET Core) both target AnyCPU platform. Is this a bug or is there some value in doing this? I'm on Windows 10 x64 and have installed the 4/18/2017 VS 2017 update. Microsoft Visual…
3
votes
2 answers

NuGet - RID and TFM Examples

I've been reviewing the code for NuGet3 on GitHub, and I see several folder patterns in https://github.com/NuGet/NuGet3/blob/a5bc907d36ddaa8d4fa6c499e50d7ebf8993ed39/src/NuGet.Client/ManagedCodeConventions.cs related to expected folder structures…
Jeff R
  • 150
  • 9
2
votes
1 answer

.NET Core Runtime

If I want to create .NET Core 2.0 apps e.g. Console App or ASP.NET Core 2.0, what .NET runtimes do I need installed on my dev machine? I'm on Windows 10. I created a .NET Core 2.0 Console app to run as a WebJob. In order to zip it up and upload it…
Sam
  • 19,814
  • 35
  • 141
  • 272
1
vote
1 answer

How do I run a 32 bit .NET Core application in Docker

I have a 32 bit (x86) .NET Core 2.2 application I want to run in a Docker container. A 64 bit version of my application works fine in a container, but the 32 bit version does not start up. No Docker log files are generated. I publish my application…
1
vote
1 answer

How to specify the target runtimes for a self-contained cross-platform .NET Core app?

I have a .NET Core console app and want to make it a self-contained app that targets Windows and Mac OS X. The way to do it, according to a tutorial that I'm following, is to edit the project file. To make it a self-contained Windows only app, I add…
Samir
  • 773
  • 1
  • 11
  • 23
0
votes
0 answers

OS specific (RID) content in nuget package

I'm trying to build a simple nuget package which copies some files to the build output directory. Thing is those files are only required for linux systems. I've created a VS project that consists of a single static class (for test purposes) a…
slator
  • 1
  • 1
0
votes
0 answers

Visual Studio Switch Context Based On RuntimeIdentifier In Addition To TargetFramework

I am using preprocessor conditions in my source code to emit different code based on the RuntimeIdentifier. Though, the code is always grayed out since I can't choose a context that is based on both TargetFramework and RuntimeIdentifier. In the…