Skip to content

System.TypeLoadException: Could not load type 'Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions' #1668

@Pheonixforce

Description

@Pheonixforce

We upgraded from RC2 to RTM and are now getting
System.TypeLoadException: Could not load type 'Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions' from assembly 'Microsoft.Extensions.DependencyInjection, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. at Microsoft.EntityFrameworkCore.Design.Internal.StartupInvoker.ConfigureServices() at Microsoft.EntityFrameworkCore.Design.DbContextOperations..ctor(ILoggerProvider loggerProvider, Assembly assembly, Assembly startupAssembly, String environment, String startupProjectDir) at Microsoft.EntityFrameworkCore.Design.MigrationsOperations..ctor(ILoggerProvider loggerProvider, Assembly assembly, AssemblyLoader startupAssemblyLoader, Assembly startupAssembly, String environment, String projectDir, String startupProjectDir, String rootNamespace) at Microsoft.EntityFrameworkCore.Tools.Cli.OperationExecutor.<>c__DisplayClass4_0.<.ctor>b__4() at Microsoft.EntityFrameworkCore.Internal.LazyRef1.get_Value()
at Microsoft.EntityFrameworkCore.Tools.Cli.OperationExecutor.AddMigration(String name, String outputDir, String contextType)
at Microsoft.EntityFrameworkCore.Tools.Cli.MigrationsAddCommand.Execute(CommonOptions commonOptions, String name, String outputDir, String context, String environment, Action1 reporter) at Microsoft.EntityFrameworkCore.Tools.Cli.MigrationsAddCommand.<>c__DisplayClass0_0.<Configure>b__0() at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args) at Microsoft.EntityFrameworkCore.Tools.Cli.Program.Main(String[] args) Could not load type 'Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions' from assembly 'Microsoft.Extensions.DependencyInjection, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.

we get this error when attempting to create a migration via

'add-migration mydb -context mycontext'

any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions