excuse me ,still is me , when i use dotnet aspnet-codegenerator razorpage -m Movie -dc MovieContext -udl -outDir Pages\Movies --referenceScriptLibraries run in cmd ,a progress is show
could not load file or assembly 'Microsoft.EntityFrameworkCord,Version=2.0.3.0,Culture=neutral,PublicKeyToken=abd9793829ddae60'.the located assembly'sman ifest definition does not match the assembly reference
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Hello, I ran into this issue as well. It seems like Install-Package Microsoft.VisualStudio.Web.CodeGeneration.Design has moved onto v2.0.4 since the article. It's causing a mismatch. While I'm guessing the better solution would be to move up the version number of the dependency I wasn't able to find what library I would need to do so - and instead installed the older v2.0.3 of Microsoft.VisualStudio.Web.CodeGeneration.Design. It seems to have worked so far. That being said I'm not actually 100% complete with the tutorial.
hello @krittersg Are you deal with this question ? I am a learner that can't to deal
Hello @zhangtingwz - I ran into this issue also (I am new to .Net as well). I got through it by (Visual Studio 2017) - Tools -> NuGet Package Manager -> Manage NuGet Packages for solution -> Microsoft.VisualStudio.Web.CodeGeneration.Design --> Check the box next to the project name on the right. and Installed version 2.0.3. I then removed the Migration created by this step (Add-Migration Initial) - I cheated slightly and just deleted the files in the Migrations folder in the project directory. Then redid the Add-Migration and it seemed to work. I got through to the next step. Hopefully I didn't miss any of the steps I took to get through it. Again, I am new and this isn't likely to be the best solution but might get you un-blocked until the official and better solution comes.
hello @krittersg ,very thanks your answer .but i can't find any file that name is Migrations (┬_┬).
hello @krittersg very thanks again , by you way ,i have achieve it ,next thank you very much
It seems like Microsoft.EntityFrameworkCore would lower then current version. when i install version 2.0.4, it shows "Could not load file or assembly 'Microsoft.EntityFrameworkCore, Version=2.0.3.0", then i update the version to 2.0.3, and remove the Migrations folder, redid Add-Migration Initial, it shows "Could not load file or assembly 'Microsoft.EntityFrameworkCore, Version=2.0.2.0"....
Make sure you have Microsoft.AspNetCore.All v2.0.8 and Microsoft.EntityFrameworkCore v2.0.3, I had the same issue but by installing the latter package the problem disappeared.
i ran into the same problem as well. Leveling all of the apps and frameworks versions using the NuGet worked for me.
Most helpful comment
Hello @zhangtingwz - I ran into this issue also (I am new to .Net as well). I got through it by (Visual Studio 2017) - Tools -> NuGet Package Manager -> Manage NuGet Packages for solution -> Microsoft.VisualStudio.Web.CodeGeneration.Design --> Check the box next to the project name on the right. and Installed version 2.0.3. I then removed the Migration created by this step (Add-Migration Initial) - I cheated slightly and just deleted the files in the Migrations folder in the project directory. Then redid the Add-Migration and it seemed to work. I got through to the next step. Hopefully I didn't miss any of the steps I took to get through it. Again, I am new and this isn't likely to be the best solution but might get you un-blocked until the official and better solution comes.