ASP.NET Core Application (.NET Framework) for Windows x64 only error in project.assets.json

For some reason <TargetFramework> in my .csproj file was singular. I added an "s" and it became "TargetFrameworks", which worked:

  <PropertyGroup>
    <TargetFrameworks>net462</TargetFrameworks>
    <RuntimeIdentifier>win7-x64</RuntimeIdentifier>
  </PropertyGroup>

I didn't change my TargetFramework, I ran in the Package Manager Console the command:

dotnet restore

And it worked! (I'm using VS2017 and I'm doing a .net core application pointing to .net framework)


I had manually changed mine from x86 to x64. In this case, just restoring the packages from Visual Studio would not work but closing Visual Studio, deleting the project.assets.json, re-starting Visual Studio and re-building the project worked for me. I left <TargetFramework> singular.

Command line nuget restore ... may also have worked.