Skip to content

Commands do not work on UWP projects #5032

Closed

Description

@natemcmaster

This bug was hiding under #4802 .

Repro steps

Install Microsoft.EFCore.Commands
Execute any EF command from PMC.

Error:

System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.AspNetCore.Hosting.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.AspNetCore.Hosting.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'

I've also seen this one:

> Add-Migration First -Verbose
Using startup project 'test\UWP.SQLite'.
Using project 'test\UWP.SQLite'
Build started...
Build succeeded.
Using application base 'C:\Users\namc\dev\ef.platformtesting\test\UWP.SQLite\bin\x86\Debug\'.
No configuration file found.
Using current directory 'C:\Users\namc\dev\ef.platformtesting\test\UWP.SQLite\bin\x86\Debug\'.
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.RuntimeAssembly.get_DefinedTypes()
   at Microsoft.EntityFrameworkCore.Design.Internal.StartupInvoker..ctor(Assembly startupAssembly, String environment, String startupProjectDir)
   at Microsoft.EntityFrameworkCore.Design.DbContextOperations..ctor(ILoggerProvider loggerProvider, Assembly assembly, Assembly startupAssembly, String environment, String startupProjectDir)
   at Microsoft.EntityFrameworkCore.Design.MigrationsOperations..ctor(AssemblyLoader assemblyLoader, ILoggerProvider loggerProvider, Assembly assembly, Assembly startupAssembly, String environment, String projectDir, String startupProjectDir, String rootNamespace)
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.<>c__DisplayClass4_0.<.ctor>b__5()
   at Microsoft.EntityFrameworkCore.Internal.LazyRef`1.get_Value()

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

Activity

  1. natemcmaster commented on Apr 11, 2016

    @natemcmaster
    ContributorAuthor

    Triage: we need to fix this for RC2

  2. added this to the milestone on Apr 12, 2016
  3. natemcmaster commented on Apr 12, 2016

    @natemcmaster
    ContributorAuthor

    Closed via #5037

  4. modified the milestones: , 1.0.0 on Oct 15, 2022
  5. added theissue type on Jun 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions