【发布时间】:2018-09-17 20:13:33
【问题描述】:
我试图配置一个简单的管道来构建我的 asp.net 核心应用程序并将其部署到共享主机中,但是它总是无法恢复 Newtonsoft.Json,争议该项目是可构建的并且完全可以在本地机器上运行,我的ci 文件如下所示:
image: microsoft/dotnet:latest
stages:
- build
before_script:
- dotnet restore -s https://api.nuget.org/v3/index.json --packages ./.nuget/
build:
stage: build
script:
- "dotnet build"
我在管道中遇到的错误是:
/usr/share/dotnet/sdk/2.1.402/Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Newtonsoft.Json". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
我也只尝试了 dotnet restore,但结果相同。
【问题讨论】:
标签: asp.net-core continuous-integration devops gitlab-ci gitlab-ci-runner