I have a build step in my TeamCity server with the following configurations.
NOTE: TeamCity is installed in the same machine as my development machine so when I say "TeamCity server I'm referring to my own PC"
Runner Type: Visual Studio (sln)
Step Name: Build Solution
Execute Step: If all previous steps finished successfully
Solution file path: MySolutionFile.sln
Targets: Clean Rebuild
Configuration: Release
When Build Solution step is executed in TeamCity, I get the following error when one of my projects Project.Api.Rest
is building:
[Dnx] C:\TeamCity\buildAgent\work\ccd41c6e23422588\Project.Api.Rest\project.json(16, 71): error NU1001: The dependency Microsoft.Extensions.Options.ConfigurationExtensions >= 1.0.0 could not be resolved.
ERROR:
My Project.Api.Rest
builds perfectly inside Visual Studio without a problem. Also, out of curiosity, I tried to execute the command that TeamCity is using and it also works perfectly fine, take a look at the screenshot.
COMMAND:
dotnet build "C:\ProjectPath\Project.Api.Rest" --configuration Release --no-dependencies --no-incremental
WORKING COMMAND:
How can I solve this TeamCity error?
TeamCity Version: 9.1.6 (build 37459)
Visual Studio 2015
Windows 10 64-bit
.lock.json
file for each project that has this error – jmclock.json
file because I do not have it in my repository. I'm still trying because I have more dependency problem than you had. if I manage to solve, I come back to tell you. Thanks – Elmer Dantas