Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2017 RC Core Console Project does not compile

When I create a new enoty core console project it doesn't compile

I can see that the nuget packages are not restored.

enter image description here

when i run dotnet restore i get the error

microsoft.net.sdk\1.0.0-alpha-20161104-2\build\Microsoft.NET.RuntimeIdentifierInference.targets(45,5): error : RuntimeIdentifier must be set for .NETFramework executables. Consider RuntimeIdentifier=win7-x86 or RuntimeIdentifier=win7-x64.

what am i missing?

like image 311
Boas Enkler Avatar asked Mar 10 '23 13:03

Boas Enkler


1 Answers

As suggested by @annemartijn, but then without the s

<RuntimeIdentifier>win7-x64</RuntimeI‌​dentifier>

See issue on github: https://github.com/dotnet/cli/issues/4619

Insert the runtime identifier segment in your .csproj file:

<Project...
  <Import...
  <PropertyGroup>
    <TargetFramework>net461</TargetFramework>
    ...
    <RuntimeIdentifier>win7-x64</RuntimeI‌​dentifier>
  </PropertyGroup>
...
like image 181
Lakerfield Avatar answered Mar 13 '23 06:03

Lakerfield