使用VSTS使用VSTS软件包和旧式csproj构建解决方案 [英] Use VSTS to build a solution with VSTS Packages and old style csproj

查看:68
本文介绍了使用VSTS使用VSTS软件包和旧式csproj构建解决方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个具有以下解决方案的解决方案:

I've a solution that has the following:

  1. 具有旧式csproj的多个库net461
  2. 使用新的csproj(Net核心库和我们的应用程序,但仅使用tatgets net461)多个项目net461,并引用旧的csproj项目.
  3. 我使用VSTS软件包来管理一些私有nuget软件包
  1. multiple libraries net461 with old style csproj
  2. multiple projects net461 with new csproj (Net core libraries and we applications but tatgets net461) and references the old style csproj projects.
  3. I use VSTS Packages to manage some private nuget packages

我在笔记本电脑中安装了VS 15.3,并且该版本运行良好,但是在VSTS上,该版本失败了.我尝试了以下方案

I've VS 15.3 installed in my laptop and the build is working great but, on VSTS the build is failing. I tried the following scenarios

  1. 当我使用dotnet restore(新工具)时,在旧式csproj上还原时构建失败,并提到构建失败(我确保使用该工具仅还原不涉及的构建)
  2. 当我使用nuget restore时,出现以下失败消息错误:找不到资产文件'[path_to_project_on_agent] \ obj \ project.assets.json'.运行NuGet软件包还原以生成此文件.在github问题> https://github.com/Microsoft/vsts-任务/问题/3762

我需要知道什么是正确的任务才能构建此项目. 谢谢,

I need to know what is the correct tasks to get this project building. Thanks,

推荐答案

最后,我通过以下方式解决了该问题

Finally I resolved the issue by

  1. 使用 NuGet工具安装程序安装Nuget版本4.3.0
  2. 在解决方案文件上运行Nuget Restore
  3. 使用Visual Studio 2015生成任务而无需在解决方案文件上进行清理也无需还原
  1. Use NuGet Tool Installer to install Nuget Version 4.3.0
  2. Run Nuget Restore on the Solution file
  3. Use Visual Studio 2015 Build Task without clean and without restore on the Solution File

我希望它能对某人有所帮助.

I hope it helps someone.

这篇关于使用VSTS使用VSTS软件包和旧式csproj构建解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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