ASP.NET Core用のOnion Architectureプロジェクトを作成しようとしています。 Referencingクラスライブラリやビルド中にのみ表示されるその他のエラーに関するいくつかの問題が発生しています。下の画像から、最初の問題はDataAnnotationsのようですが、私はSystem.ComponentModel.Annotationsを追加しましたが(古いバージョンのSystem.ComponentModel.DataAnnotationsは見つかりませんでした)、エラーが発生して4.5.1バージョンがない私は5.4バージョンをインストールしました...私は両方が必要ですか? 2番目の質問は、LINQクエリに関連し、System.Runtimeの不足を不平にします。オニオンアーキテクチャのクラスライブラリパッケージ - バージョンの問題
次のようにLifeLine.Coreでの私のproject.jsonは次のとおりです。
{
"version": "1.0.0-*",
"description": "LifeLine.Core Class Library",
"authors": [ "212040799" ],
"tags": [ "" ],
"projectUrl": "",
"licenseUrl": "",
"frameworks": {
"net451": { },
"dotnet5.4": {
"dependencies": {
"Microsoft.CSharp": "4.0.1-beta-23516",
"System.Collections": "4.0.11-beta-23516",
"System.Linq": "4.0.1-beta-23516",
"System.Runtime": "4.0.21-beta-23516",
"System.Threading": "4.0.11-beta-23516"
}
}
},
"dependencies": {
"System.ComponentModel.Annotations": "4.0.11-beta-23516"
}
}
し、次のようにLifeLine.Infrastructureの私project.jsonは次のとおりです。
{
"version": "1.0.0-*",
"description": "LifeLine.Infrastructure Class Library",
"authors": [ "212040799" ],
"tags": [ "" ],
"projectUrl": "",
"licenseUrl": "",
"frameworks": {
"net451": { },
"dotnet5.4": {
"dependencies": {
"Microsoft.CSharp": "4.0.1-beta-23516",
"System.Collections": "4.0.11-beta-23516",
"System.Linq": "4.0.1-beta-23516",
"System.Runtime": "4.0.21-beta-23516",
"System.Threading": "4.0.11-beta-23516"
}
}
},
"dependencies": {
"EntityFramework.Core": "7.0.0-rc1-final",
"LifeLine.Core": "1.0.0-*"
}
}
project.jsonを投稿する – Tseng
は、上記の元のスレッドのプロジェクトごとにproject.jsonを追加しました。 – Reza