Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't run .NET Core 2.1(.1) application on Windows Server 2016

I'm trying to run a .NET Core application on my Windows Server 2016 instance. It builds/runs fine on my Windows 10 machine.

First I'm doing dotnet publish and I copy the published site to the Windows Server instance. I followed this guide and installed both the hosting bundle as well as the latest SDK (2.1.3).

However when I try to dotnet myapp.dll i get the following error message:

It was not possible to find any compatible framework version
The specified framework 'Microsoft.AspNetCore.All', version '2.1.1' was not found.
  - Check application dependencies and target a framework version installed at:
      C:\Program Files\dotnet\
  - Installing .NET Core prerequisites might help resolve this problem:
      http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
  - The .NET Core framework and SDK can be installed from:
      https://aka.ms/dotnet-download
  - The following versions are installed:
      2.1.0 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]

I can see clearly that indeed Microsoft.AspNetCore.All only has a 2.1.0 version located in Program Files\dotnet\shared. How do I get the correct 2.1.1 version?

Any guidance is highly appreciated.

like image 439
Ropstah Avatar asked Jun 19 '18 00:06

Ropstah


1 Answers

Use this link to install 2.1.1 core sdk version:

https://github.com/dotnet/versions/tree/7a833dddfddc27f2074b755b94234a25b9757637/build-info/dotnet/product/cli/release/2.1

like image 60
Jourmand Avatar answered Sep 20 '22 23:09

Jourmand