VSTS Build失败并显示错误'错误:CS0246,错误:找不到CS0518和json'。运行NuGet包还原以生成此文件' [英] VSTS Build is failing with error 'Error : CS0246, Error : CS0518 and json' not found. Run a NuGet package restore to generate this file'

查看:308
本文介绍了VSTS Build失败并显示错误'错误:CS0246,错误:找不到CS0518和json'。运行NuGet包还原以生成此文件'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如主题中所述,  VSTS Build失败并显示错误'错误:CS0246,错误:CS0518和json'未找到。运行NuGet包恢复以生成此文件',

As specified in the subject, VSTS Build is failing with error 'Error : CS0246, Error : CS0518 and json' not found. Run a NuGet package restore to generate this file',

以深入解释该问题,我们已经包含'的NuGet恢复的版本1 *在我们的默认设置,构建定义,当我们排队构建‘NugetRestore’任务完成,
,而建立与下面的错误失败和例外情况,我们需要一些指导或解决此问题。

to explain in deep about the issue, We have included 'NuGet Restore' version 1.* in our build definition with default setting, when we queue the build 'NugetRestore' task is completing, but Build is failing with below errors and exceptions, So we requires some guidance or work around to fix this issue.

错误详情: 

Sham Sundar.G

Sham Sundar.G

推荐答案

这是一个dotnet项目。所以,你应该使用"dotnet restore"而不是"nuget restore"。尝试使用dotnet核心
模板(使用dotnet restore)。

如果您使用经过身份验证的nuget feed,那么您可以使用nuget restore但您还需要使用nuget installer任务。见
https://github.com/Microsoft/vsts-tasks/issues/ 3762 对此进行讨论。

If you are using authenticated nuget feeds, then you can use nuget restore but you also need to use nuget installer task. See https://github.com/Microsoft/vsts-tasks/issues/3762 for a discussion on that.



这篇关于VSTS Build失败并显示错误'错误:CS0246,错误:找不到CS0518和json'。运行NuGet包还原以生成此文件'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆