【发布时间】:2021-01-25 09:52:47
【问题描述】:
有一个“Data”项目包含app的上下文,根项目“TheFarmersMarketApp”参考Data项目。主要项目是在 WPF 上编写的。
Add-Migration "Initial Migration" -Project Data -StartUpProject TheFarmersMarketApp
返回
Could not load assembly 'Data'. Ensure it is referenced by the startup project 'TheFarmersMarketApp'.
此外,我更改了“数据”和“模型”(呃...)项目上的“默认项目”字段,并重新启动了我的笔记本电脑以确保所有必要的服务都已打开。
有一些Visual Studio的截图,如果视觉上更容易理解问题。
PackageManagerConsole + SolutionExplorer + TheFarmersMarket.csproj windows
【问题讨论】:
-
重建项目数据,看看有没有错误。
标签: c# xml wpf entity-framework-core entity-framework-core-migrations