how to determine if a .net app is a “core” app?

Updated for .NET Core >= 2.x and/or VS2017

In VS2017 .NET Core projects use the .csproj structure again.

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netcoreappx.y</TargetFramework>
  </PropertyGroup>

or

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netstandardx.y</TargetFramework>
  </PropertyGroup>

Old Answer for .NET Core 1.x and VS2015

There are some indicators to it.

The existence project.json suggest it’s one of the newer project forms (be aware though that project.json will go away with .NET Core/.NET Core Tools for VS with Version 1.1).

Inside it, you’ll have a frameworks section, like

"frameworks": {
  "net45": {
    "frameworkAssemblies": {
      "System.Runtime.Serialization": "4.0.0.0"
    }
  },
  "netstandard1.0": {
    "imports": [ "dnxcore50", "portable-net45+win8" ],
    "dependencies": {
    }
  },
  "netstandard1.3": {
    "imports": [ "dnxcore50", "portable-net45+win8" ],
    "dependencies": {
      "System.Runtime.Serialization.Formatters": "4.0.0-rc3-24212-01"
    }
  }
}

In case of applications (ASP.NET Core Web Project or new project.json based console applications), netstandard1.x will be named netcoreapp1.0.

If there is more than one entry, the application or library targets multiple platforms (and will build multiple binary files in separate folders).

Update

Of course I forgot another indicator. .NET Core application do reference Microsoft.NETCore.App (either as "type": "platform" for portable apps or without it for self-contained apps). netstandard1.x (class libraries) do reference NETStandard.Library.

.NET Core applications are based on System.Runtime which is a part of .NET Framework 4.5 and newer and used for Windows (and Windows Phone) 8.0/8.1/10 applications, hence portable-net45+win81 packages are compatible with .NET Core too.

That being said, ASP.NET Core is a webstack which can run on both, full .NET Framework (4.5 or higher) and on .NET Core. So just having a ASP.NET Core application do not tell much about the platform it aims.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)