Class 洋葱架构库包 - 版本问题
Class Library Package for Onion Architecture - version issues
我正在尝试为 ASP.NET 核心创建一个洋葱架构项目。我 运行 遇到了引用 class 库的一些问题以及仅在构建期间出现的其他错误。从下图来看,第一个问题好像是DataAnnotations,我加了System.ComponentModel.Annotations(没找到旧版本System.ComponentModel.DataAnnotations)但是报错说我没有4.5.1版本, 我确实安装了 5.4 版本...我需要两者吗?
第二个问题与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-*"
}
}
尽管这是一个 'Class Library Package' 项目,但似乎我必须向其中添加 Microsoft.AspNet.Mvc。
我正在尝试为 ASP.NET 核心创建一个洋葱架构项目。我 运行 遇到了引用 class 库的一些问题以及仅在构建期间出现的其他错误。从下图来看,第一个问题好像是DataAnnotations,我加了System.ComponentModel.Annotations(没找到旧版本System.ComponentModel.DataAnnotations)但是报错说我没有4.5.1版本, 我确实安装了 5.4 版本...我需要两者吗? 第二个问题与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-*"
}
}
尽管这是一个 'Class Library Package' 项目,但似乎我必须向其中添加 Microsoft.AspNet.Mvc。