.NetCore 3.0迁移遇到的各种问题

错误集合

【错误】当前+.NET+SDK+不支持将+.NET+Core+3.0+设置为目标。请将+.NET+Core+2.2+或更低版

【解决方法】勾选上就可以了

 

2.

【错误】

add-migration init
Build started...
Build succeeded.
System.ArgumentNullException: Value cannot be null. (Parameter 'connectionString')

【原因】

我的迁移的dbcontext不在启动程序集中读取连接字符串时读错了

 

3.

【错误】ERROR: System.ArgumentNullException: Value cannot be null. Parameter name: type at System.Activator.CreateInstance(Type type, Boolean nonPublic)

【原因】

在程序集属性里改改过名字所以dll与路径不匹配

【解决方法】可以先移除再改过名字再添加项目

 

4.

【错误】build fail

【原因】我的是忘记设置启动项了

【解决方法】

1.设置启动项

2.有错误提示未解决编译失败

 

 

posted @ 2020-01-26 04:09  mollom  阅读(1102)  评论(0编辑  收藏  举报