.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.有錯誤提示未解決編譯失敗

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM