首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >ASP.NET核心设备工程VSTS连续集成的建立

ASP.NET核心设备工程VSTS连续集成的建立
EN

Stack Overflow用户
提问于 2017-11-17 13:56:19
回答 3查看 354关注 0票数 0

我尝试为使用ASP.NET开发的德瓦埃德核心项目在VSTS中设置连续集成(CI)。

我已经检查了项目中的NuGet.config文件,似乎是从本地机器中引用的。

NuGet.config

代码语言:javascript
复制
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="devextreme-controls-netcore" value="C:\Program Files (x86)\DevExpress 17.1\DevExtreme\System\DevExtreme\Bin\AspNetCore" />
  </packageSources>
</configuration>

我已经为这个项目在VSTS中创建了一个构建定义,并为一个构建排队。我正在恢复软件包时出错。

VS:日志文件:

代码语言:javascript
复制
2017-11-17T11:26:33.0089440Z ##[section]Starting: Restore
2017-11-17T11:26:33.0279221Z ==============================================================================
2017-11-17T11:26:33.0279221Z Task         : .NET Core
2017-11-17T11:26:33.0279221Z Description  : Build, test and publish using dotnet core command-line.
2017-11-17T11:26:33.0279221Z Version      : 1.0.2
2017-11-17T11:26:33.0279221Z Author       : Microsoft Corporation
2017-11-17T11:26:33.0279221Z Help         : [More Information](https://go.microsoft.com/fwlink/?linkid=832194)
2017-11-17T11:26:33.0279221Z ==============================================================================
2017-11-17T11:26:34.6038344Z [command]"C:\Program Files\dotnet\dotnet.exe" restore d:\a\3\s\DevExtremeAspNetCoreApp\DevExtremeAspNetCoreApp.csproj
2017-11-17T11:26:42.2434595Z   Restoring packages for d:\a\3\s\DevExtremeAspNetCoreApp\DevExtremeAspNetCoreApp.csproj...
2017-11-17T11:26:42.2434595Z   Restoring packages for d:\a\3\s\DevExtremeAspNetCoreApp\DevExtremeAspNetCoreApp.csproj...
2017-11-17T11:26:42.2434595Z C:\Program Files\dotnet\sdk\2.0.2\NuGet.targets(102,5): **error : The local source 'C:\Program Files (x86)\DevExpress 17.1\DevExtreme\System\DevExtreme\Bin\AspNetCore' doesn't exist.** [d:\a\3\s\DevExtremeAspNetCoreApp\DevExtremeAspNetCoreApp.csproj]
2017-11-17T11:26:42.6496133Z ##[error]Error: C:\Program Files\dotnet\dotnet.exe failed with return code: 1
2017-11-17T11:26:42.6496133Z ##[error]Dotnet command failed with non-zero exit code on the following projects : d:\a\3\s\DevExtremeAspNetCoreApp\DevExtremeAspNetCoreApp.csproj
2017-11-17T11:26:42.6536144Z ##[section]Finishing: Restore

如何构建devextreme-controls-netcore是VSTS来设置CI.

请提出解决这个问题的办法。

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2017-11-20 02:49:51

首先,基于这个线程:DevExtreme.AspNet.Core在NuGet存储库中不可用,核心包被发布在它们的私有NuGet存储库(https://nuget.devexpress.com/{feed-authorization-key}/api)上,因此如果您拥有授权密钥,您可以从该私有NuGet存储库中检索这些包。

其次,可以将相关包(在C:\Program Files (x86)\DevExpress 17.1\DevExtreme\System\DevExtreme\Bin\AspNetCore中)添加到源代码管理中,然后将其映射到构建代理(获取源),并更改NuGet.config中的值。

另一种方式是丹尼尔说,上传到你的VSTS包提要。

票数 1
EN

Stack Overflow用户

发布于 2017-11-17 14:45:27

您正在引用一个本地路径(C:\Program Files (x86)\DevExpress 17.1\DevExtreme\System\DevExtreme\Bin\AspNetCore)。如果生成代理中不存在该路径,则生成将失败。

最好的解决方案是在VSTS中设置包提要,将包上传到VSTS,并更新项目以从私有包提要中提取包。

票数 1
EN

Stack Overflow用户

发布于 2018-02-26 14:18:08

我创建了一个nuget.config,并在VSTS构建步骤"nuget“中选择了它。示例:

代码语言:javascript
复制
<configuration>
          <packageRestore>
            <add key="enabled" value="True" />
            <add key="automatic" value="True" />
          </packageRestore>
          <activePackageSource>
            <add key="All" value="(Aggregate source)" />
          </activePackageSource>
          <packageSources>
            <add key="NuGet official package source" value="https://api.nuget.org/v3/index.json" />
            <add key="DevExpress package source" value="https://nuget.devexpress.com/{yourKeyHere}/api" />
          </packageSources>
        </configuration>
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/47352270

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档