Matthew Verstraete
Matthew Verstraete

Reputation: 6781

Proper setup of project.json for just .Net Core in RC2?

With the release of .Net Core RC2 I have started rebuilding my website with it and after creating a web application I opened the project.json file so I could remove references to the older .Net versions but I am not sure which ones to leave in for just the .Net Core on a Windows IIS (Azure/Windows 2012R2). By default the file config looks like this:

  "dependencies": {
    "Microsoft.NETCore.App": {
      "version": "1.0.0-rc2-3002702",
      "type": "platform"
    },
    "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-rc2-final",
    "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-final"
  },

  "tools": {
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": {
      "version": "1.0.0-preview1-final",
      "imports": "portable-net45+win8+dnxcore50"
    }
  },

  "frameworks": {
    "netcoreapp1.0": {
      "imports": [
        "dotnet5.6",
        "dnxcore50",
        "portable-net45+win8"
      ]
    }
  },

I know dotnet5.6 is an older .Net (I think 4.6?). but what is the portable-net45+win8? Is that safe to remove? And do I need to change the imported tool to something else so it only imports tools for .Net Core and not 4.5/win8?

Upvotes: 0

Views: 189

Answers (1)

Thomas
Thomas

Reputation: 5230

Your project json looks good. If you do not add any further packages, you can remove the complete "imports" node below the netcoreapp from your project.json. It just states, that if a depending package can also target "dotnet5.6" (or "dnxcore50" or "portable-net45+win8" instead of "netcoreapp1.0". It is bascially a statement allowing the brand-new netstandard and netcoreapp targets to use NuGet packages which are not yet migrated to netstandard. The ASP.NET Core assemblies have already been migrated.

Upvotes: 1

Related Questions