The Entity Framework Core Package Manager Console Tools don't support PowerShell version 2.0. Upgrade to PowerShell version 3.0 or higher

asp.net-core entity-framework-core

Question

I want use EF Core in Asp.net core so i follow this Instruction but when i want to use this command:Add-Migration first for creating database in PackageManger console, it gives me this error:

The Entity Framework Core Package Manager Console Tools don't support PowerShell version 2.0. Upgrade to PowerShell version 3.0 or higher, restart Visual Studio, and try again.

what is the problem?

NOTE: this is my Project.json file:

{
 "dependencies": {
   "Microsoft.NETCore.App": {
     "version": "1.0.1",
     "type": "platform"
   },
   "Microsoft.AspNetCore.Mvc": "1.0.1",
   "Microsoft.AspNetCore.Routing": "1.0.1",
   "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
   "Microsoft.AspNetCore.Server.Kestrel": "1.0.1",
   "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
   "Microsoft.Extensions.Configuration.FileExtensions": "1.0.0",
   "Microsoft.Extensions.Configuration.Json": "1.0.0",
   "Microsoft.Extensions.Logging": "1.1.0",
   "Microsoft.Extensions.Logging.Console": "1.0.0",
   "Microsoft.Extensions.Logging.Debug": "1.0.0",
   "Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0",
   "Microsoft.EntityFrameworkCore.SqlServer": "1.1.0",
   "Microsoft.EntityFrameworkCore.Tools": "1.1.0-preview4-final",
   "Microsoft.EntityFrameworkCore.Design": "1.1.0"
  },

  "tools": {
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
    },

 "frameworks": {
   "netcoreapp1.0": {
    "imports": [
      "dotnet5.6",
      "portable-net45+win8"
     ]
   }
 },

 "buildOptions": {
   "emitEntryPoint": true,
   "preserveCompilationContext": true
  },

 "runtimeOptions": {
   "configProperties": {
     "System.GC.Server": true
   }
 },

 "publishOptions": {
   "include": [
     "wwwroot",
     "**/*.cshtml",
     "appsettings.json",
     "web.config"
    ]
  },

  "scripts": {
    "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
   }
}
1
3
1/13/2017 1:52:06 PM

Popular Answer

First Download latest version of NuGet from below link

https://dist.nuget.org/win-x86-commandline/latest/nuget.exe

Then download below exe and install it.

https://download.microsoft.com/download/E/7/6/E76850B8-DA6E-4FF5-8CCE-A24FC513FD16/Windows6.1-KB2506143-x64.msu

After Installation restart your machine and open your visual studio.

it will work for me

Thanks

1
12/11/2018 9:23:29 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow