Could not load file or assembly 'WebMatrix.Data`

前端 未结 6 879
说谎
说谎 2021-02-06 22:22

I updated MVC4 to MVC5. When you run the application I got an error that I don\'t have WebMatrix.Data. I installed it PM> Install-Package WebMatrix.Data

6条回答
  •  暖寄归人
    2021-02-06 22:51

    This is what worked for me. Took weeks to figure it out.

    Make sure your target framework to what you want it to be (I had 4.6.1).

    Go into: Tools > NuGet Package Manager > Package Manager Console and do the following commands.

    Uninstall-Package Microsoft.AspNet.WebHelpers
    Uninstall-Package Microsoft.AspNet.WebPages.OAuth
    Uninstall-Package Microsoft.AspNet.WebPages.WebData
    Uninstall-Package Microsoft.AspNet.WebPages.Data
    
    Install-Package Microsoft.AspNet.WebPages.Data
    Install-Package Microsoft.AspNet.WebPages.WebData
    Install-Package Microsoft.AspNet.WebPages.OAuth
    Install-Package Microsoft.AspNet.WebHelpers
    

    Hope this helps anyone that tried the other solutions with no luck.

提交回复
热议问题