title: Windows Server: The specified framework 'Microsoft.AspNetCore.App', version '2.1.0' was not found
body: <p>I am trying to run a dotnet core api (2.1.0) on my Windows Server (2012 R2) by running the following command: <code>dotnet Api.dll</code> But I keep getting the following message.</p>
  
  <pre><code>The specified framework 'Microsoft.AspNetCore.App', version '2.1.0' 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&amp;clcid=0x409
    - The .NET Core framework and SDK can be installed from:
        https://aka.ms/dotnet-download
  </code></pre>
  
  <p>The api runs normally on my mac, when I use the same command (<code>dotnet Api.dll</code>). When I use <code>dotnet --info</code> I get the following and it says the latest Runtime and SDK are installed.</p>
  
  <pre><code>Runtime Environment:
   OS Name:     Windows
   OS Version:  6.3.9600
   OS Platform: Windows
   RID:         win81-x64
   Base Path:   C:\Program Files\dotnet\sdk\2.1.300\
  
  Host (useful for support):
    Version: 2.1.0
    Commit:  caa7b7e2ba
  
  .NET Core SDKs installed:
    2.1.201 [C:\Program Files\dotnet\sdk]
    2.1.300 [C:\Program Files\dotnet\sdk]
  
  .NET Core runtimes installed:
    Microsoft.NETCore.App 2.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.
  App]
    Microsoft.NETCore.App 2.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.
  App]
    Microsoft.NETCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.
  App]
  
  To install additional .NET Core runtimes or SDKs:
    https://aka.ms/dotnet-download
  </code></pre>
  
  <p>Already tried adding the <code>PublishWithAspNetCoreTargetManifest</code> part and re-publish. It did gave me more files when publishing but didn't work for my current issue.</p>
  
  <pre><code>&lt;Project Sdk="Microsoft.NET.Sdk.Web"&gt;
    &lt;PropertyGroup&gt;
      &lt;TargetFramework&gt;netcoreapp2.1&lt;/TargetFramework&gt;
  -&gt;  &lt;PublishWithAspNetCoreTargetManifest&gt;false&lt;/PublishWithAspNetCoreTargetManifest&gt; &lt;-
    &lt;/PropertyGroup&gt;
    &lt;ItemGroup&gt;
      &lt;Folder Include="wwwroot\" /&gt;
    &lt;/ItemGroup&gt;
    &lt;ItemGroup&gt;
      &lt;PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.0" /&gt;
      ....
  </code></pre>
  
  <p>Could it be because its looking for <code>Microsoft.AspNetCore.App</code> and I got <code>Microsoft.NETCore.App 2.1.0</code> installed? I don't know really, I know the latest .NET core runtime and sdk are installed. Any idea what I am doing wrong?</p>