skip to Main Content

I successfully created and deployed a .NET Core App in Visual Studio 2015. It appears though that tooling and support for .NET Core in VS2015 is going away so I’ve decided to start fresh with VS2017. However the problem I’m running into is versioning. My hosting provider is running Plesk ~v12 and only supports a few of the run times, and definitely not the latest and greatest.

In VS2015 with the project.json I could target a specific run time version by modifying all the dependencies, however I can’t see how to do this within Visual Studio 2017. My host has replied that they support “1.0.3” (Current version is 1.04 in the latest SDK) for .NET Core 1.0 apps, and “1.1.0 and 1.1.1” for .NET Core 1.1 apps. (Current version is 1.1.2 in the latest SDK)

When I deploy an application to my host, I receive the following error:

HTTP Error 502.5 – Process Failure

I believe this is caused because it is looking for runtime 1.0.4.

So, in a nutshell, how do I target the runtime version 1.0.3?

2

Answers


  1. You can specify which SDK to use (even an older one) by adding a global.json file at the root of your solution.

    {
        "sdk": { "version" : "1.0.3" }
    }
    

    In addition, it is possible to remotely install an SDK using this Powershell script, so if the SDK is not on the server you can install it. We are using this approach on our continuous integration server because the SDK we need is not installed on it.

    Login or Signup to reply.
  2. To set a specific version of the .Net Core runtime, you can add the <RuntimeFrameworkVersion> element to your csproj. For example, to use .Net Core 1.0.3, use:

    <TargetFramework>netcoreapp1.0</TargetFramework>
    <RuntimeFrameworkVersion>1.0.3</RuntimeFrameworkVersion>
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search