无法在TeamCity中构建.Net Core 3.0应用

时间:2019-08-20 12:21:41

标签: .net-core teamcity .net-core-3.0

我正在尝试让.Net Core 3.0 Preview 8项目在Teamcity构建服务器上构建...

在Dev机器和构建服务器上,我可以在VS 2019社区和“全部构建”中手动打开解决方案。

但是,当我在TC环境中进行操作时,出现以下错误。

为什么会出现错误,我该如何解决?

BR,安德斯

**[14:08:10][restore] Restoring packages for C:\TeamCity\buildAgent\work\676ee7e7a6fc8ab1\Ajf.NsPlanner.Application\Ajf.NsPlanner.Application.csproj...
[14:08:13][restore] Package AutoMapper 9.0.0 is not compatible with netcoreapp3.0 (.NETCoreApp,Version=v3.0). Package AutoMapper 9.0.0 supports:
[14:08:13][restore]   - net461 (.NETFramework,Version=v4.6.1)
[14:08:13][restore]   - netstandard2.0 (.NETStandard,Version=v2.0)**



[14:08:02]Step 1/7: NuGet Installer (12s)
[14:08:03][Step 1/7] scan: Searching for nuget.config files
[14:08:03][Step 1/7] restore: Restoring NuGet packages for NsPlanner.sln (11s)
[14:08:03][restore] Starting: C:\TeamCity\buildAgent\tools\NuGet.CommandLine.4.1.0\tools\NuGet.exe restore C:\TeamCity\buildAgent\work\676ee7e7a6fc8ab1\NsPlanner.sln -Source https://api.nuget.org/v3/index.json -Source http://ajf-prod-02/nuget/nuget/
[14:08:03][restore] in directory: C:\TeamCity\buildAgent\work\676ee7e7a6fc8ab1
[14:08:07][restore] MSBuild auto-detection: using msbuild version '16.2.37902.0' from 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\bin'.
[14:08:10][restore] Restoring packages for C:\TeamCity\buildAgent\work\676ee7e7a6fc8ab1\Ajf.NsPlanner.Application\Ajf.NsPlanner.Application.csproj...
[14:08:13][restore] Package AutoMapper 9.0.0 is not compatible with netcoreapp3.0 (.NETCoreApp,Version=v3.0). Package AutoMapper 9.0.0 supports:
[14:08:13][restore]   - net461 (.NETFramework,Version=v4.6.1)
[14:08:13][restore]   - netstandard2.0 (.NETStandard,Version=v2.0)
[14:08:13][restore] Package Microsoft.Extensions.DependencyInjection.Abstractions 3.0.0-preview8.19405.4 is not compatible with netcoreapp3.0 (.NETCoreApp,Version=v3.0). Package Microsoft.Extensions.DependencyInjection.Abstractions 3.0.0-preview8.19405.4 supports: netstandard2.0 (.NETStandard,Version=v2.0)
[14:08:13][restore] One or more packages are incompatible with .NETCoreApp,Version=v3.0.
[14:08:13][restore] Committing restore...

1 个答案:

答案 0 :(得分:0)

我现在正在建造它。解决方案是首先使用“ dot net cli restore”(以前是Nuget安装程序),然后使用vs2019来构建解决方案。

相关问题