Could not load type 'Microsoft.Extensions.DependencyInjection.ServiceProviderExtensions'

本秂侑毒 提交于 2021-01-29 08:00:27

问题


Since I updated to Visual Studio 2015 update 3 and restored my Nuget packages I'm getting an

Could not load type 'Microsoft.Extensions.DependencyInjection.ServiceProviderExtensions' from assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.

error.In my project.json file I have the following Entity Framework packages defined

"EntityFramework.Core": "7.0.0-rc1-final",
"EntityFramework.Relational": "7.0.0-rc1-final",
"EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final",
"EntityFramework.Commands": "7.0.0-rc1-final"

Is there anything that I have to change that I'm not aware of?


回答1:


The problem was that I had a EntityFramework.Core and Microsoft.EntityFrameworkCore package installed. I was able to recreate the project and restore all the packages without Microsoft.EntityFrameworkCore




回答2:


try putting this

  {
     "projects": [ "src", "test" ],
     "sdk": {
        "version": "1.0.0-rc1-final"
     }
  }

in global.json



来源:https://stackoverflow.com/questions/38435613/could-not-load-type-microsoft-extensions-dependencyinjection-serviceproviderext

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!