Skip to content

PowerShell cmdlets error on initial Database Migration creation #6

@fmorriso

Description

@fmorriso

The following PowerShell cmdlet, executed in the Package Manager Console of Visual Studio 2017 Enterprise (15.2.26430.14) with the Default Project: dropdown listbox set to Scheduler.API causes an error:

Add-Migration -Name Initial -Project Scheduler.API

Startup project 'Scheduler.Model' targets framework '.NETStandard'. This framework is not intended for execution and may fail to resolve runtime dependencies. If so, select a different startup project and try again.
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.EntityFrameworkCore.Design, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'Microsoft.EntityFrameworkCore.Design, Culture=neutral, PublicKeyToken=null'
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
at Microsoft.EntityFrameworkCore.Tools.ReflectionOperationExecutor..ctor(String assembly, String startupAssembly, String projectDir, String contentRootPath, String dataDirectory, String rootNamespace, String environment)

I have updated all NuGet packages in all 3 projects to the latest editions (July 1, 2017).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions