我正在努力找出使用Team City使用csproj引用构建.NET Core项目的问题,我实际上是新手相关的团队城市流程,但我还读过其他类似的问题但是没有一个解决方法适合我。 这是Team City显示的消息:
error NU1001: The dependency Microsoft.ApplicationInsights.AspNetCore >= 1.0.0 could not be resolved.
• C:\BuildAgent\work\1e2a73a15b18c502\ProjectFolder\ProjectCore\project.json(4, 39): error NU1001: The dependency Microsoft.AspNetCore.Mvc >= 1.0.1 could not be resolved.
• C:\BuildAgent\work\1e2a73a15b18c502\ProjectFolder\ProjectCore\project.json(11, 50): error NU1001: The dependency Microsoft.AspNetCore.Server.Kestrel >= 1.0.1 could not be resolved.
• C:\BuildAgent\work\1e2a73a15b18c502\ProjectFolder\ProjectCore\project.json(13, 64): error NU1001: The dependency Microsoft.Extensions.Configuration.FileExtensions >= 1.0.0 could not be resolved.
• C:\BuildAgent\work\1e2a73a15b18c502\ProjectFolder\ProjectCore\project.json(14, 54): error NU1001: The dependency Microsoft.Extensions.Configuration.Json >= 1.0.0 could not be resolved.
• C:\BuildAgent\work\1e2a73a15b18c502\ProjectFolder\ProjectCore\project.json(16, 51): error NU1001: The dependency Microsoft.Extensions.Logging.Console >= 1.0.0 could not be resolved.
• C:\BuildAgent\work\1e2a73a15b18c502\ProjectFolder\ProjectCore\project.json(17, 49): error NU1001: The dependency Microsoft.Extensions.Logging.Debug >= 1.0.0 could not be resolved.
• C:\BuildAgent\work\1e2a73a15b18c502\ProjectFolder\ProjectCore\project.json(18, 67): error NU1001: The dependency Microsoft.Extensions.Options.ConfigurationExtensions >= 1.0.0 could not be resolved.
• C:\BuildAgent\work\1e2a73a15b18c502\ProjectFolder\ProjectCore\project.json(24, 43): error NU1001: The dependency Microsoft.AspNetCore.Session >= 1.0.0 could not be resolved.
• C:\BuildAgent\work\1e2a73a15b18c502\ProjectFolder\ProjectCore\project.json(25, 34): error NU1001: The dependency Swashbuckle >= 6.0.0-beta901 could not be resolved.
• C:\BuildAgent\work\1e2a73a15b18c502\ProjectFolder\ProjectCore\project.json(27, 25): error NU1001: The dependency ***.Utilities - .net 4.5.0 project*** could not be resolved.
• C:\BuildAgent\work\1e2a73a15b18c502\ProjectFolder\ProjectCore\project.json(30, 24): error NU1001: The dependency ***.Data - .net 4.5.2 project *** could not be resolved.
• C:\BuildAgent\work\1e2a73a15b18c502\ProjectFolder\ProjectCore\project.json(33, 28): error NU1001: The dependency ***.Domain - .net 4.5.2 project*** could not be resolved.
这是我的project.json
{
"dependencies": {
"Microsoft.ApplicationInsights.AspNetCore": "1.0.0",
"Microsoft.AspNetCore.Mvc": "1.0.1",
"Microsoft.AspNetCore.Mvc.Abstractions": "1.1.0",
"Microsoft.AspNetCore.Mvc.Core": "1.1.0",
"Microsoft.AspNetCore.Mvc.ViewFeatures": "1.1.0",
"Microsoft.AspNetCore.Http": "1.1.0",
"Microsoft.AspNetCore.Routing": "1.1.0",
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.1",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
"Microsoft.Extensions.Configuration.FileExtensions": "1.0.0",
"Microsoft.Extensions.Configuration.Json": "1.0.0",
"Microsoft.Extensions.Logging": "1.0.0",
"Microsoft.Extensions.Logging.Console": "1.0.0",
"Microsoft.Extensions.Logging.Debug": "1.0.0",
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0",
"FluentNHibernate": "2.0.3",
"Newtonsoft.Json": "9.0.1",
"Microsoft.AspNetCore.Http.Features": "1.1.0",
"Microsoft.AspNet.WebApi.Client": "5.2.3",
"Microsoft.AspNetCore.StaticFiles": "1.0.0",
"Microsoft.AspNetCore.Session": "1.0.0",
"Swashbuckle": "6.0.0-beta901"
},
"tools": {
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
},
"frameworks": {
"net452": {
"dependencies": {
"***.Utilities": {
"target": "project"
},
"***.Data": {
"target": "project"
},
"***.Domain": {
"target": "project"
}
}
}
},
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},
"publishOptions": {
"include": [
"wwwroot",
"**/*.cshtml",
"appsettings.json",
"web.config"
]
},
"scripts": {
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
}
}
有人可以帮我吗?我不知道可能出现什么问题。
提前致谢