Reputation: 2604
I'm trying to get my .Net Core 3.0 preview 8 project to build on my Teamcity build server...
On Dev machine and on build server I can open solution in VS 2019 Community and Build All (manually).
However, when I do it in the context of TC, I get the error below.
Why do I get the error and what can I do to fix it?
BR, Anders
**[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...
Upvotes: 0
Views: 2459
Reputation: 2604
I've got it building now. The solution was to use 'dot net cli restore' (was: Nuget installer) as the first step, then vs2019 to build the solution.
Upvotes: 2