Add-Migration fails on a UWP class library
See original GitHub issueI moved my model to a class library (along with the context). When I try and run the command:
Add-Migration MyFirstMigration -project Model
I get the following error:
Add-Migration : Exception calling "CreateInstanceAndUnwrap" with "8" argument(s): "Could not load file or assembly 'Microsoft.Framework.Logging.Abstractions, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified."
At line:1 char:1
+ Add-Migration MyFirstMigration -project GymBuilder.Model
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Add-Migration], MethodInvocationException
+ FullyQualifiedErrorId : FileNotFoundException,Add-Migration
Issue Analytics
- State:
- Created 8 years ago
- Comments:16 (6 by maintainers)
Top Results From Across the Web
Cant run migrations in UWP app
I used Code-First approach and I was able to run my first migration (created the Migrations folder with the migration class and the...
Read more >UWP + EF core: Unable to add reference to project (cross- ...
When I make a UWP app, and a .NET Standard class library with Entity Framework Core, I should use cross-target like this: <TargetFrameworks>netcoreapp2.0 ......
Read more >Share code between a desktop application and a UWP app
NET Framework, you can migrate it to a UWP app by leveraging .NET Standard 2.0. Move as much code as you can into...
Read more >The Secret to Running EF Core 2.0 Migrations from a NET ...
It needs a runtime. A common workaround is that even if you haven't gotten to the UI part of your app yet, to...
Read more >Migrating a WinUI or UWP class library to an ...
Applying Uno Platform project structure. Adding Uno Platform support to an existing class library entails changing the contents of the existing .csproj file....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I found what my issue was. Embedded in my project file it was referencing the old beta5 build. I had to remove it from a text editor since NuGet and Visual Studio weren’t catching it.
You may want to double check the packages folder and make sure that the Microsoft.Framework.Logging.Abstractions folder is present with it’s data for the beta version you are using.
I have given up on using Add-Migration… created Migration file by hand… much better use of my time