建立在Visual Studio在线缺失的软件包的错误(2015年版) [英] Build errors of missing packages in Visual Studio Online (2015 version)

查看:1570
本文介绍了建立在Visual Studio在线缺失的软件包的错误(2015年版)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到以下消息时,我在登记入住到Visual Studio在线触发构建。它在本地编译和部署就好了。

I'm getting the following message when I trigger a build on check-in to Visual Studio Online. Locally it compiles and deploys just fine.

包\\ Microsoft.Net.Compilers.1.0.0 \\ TOOLS \\ Microsoft.CSharp.Core.targets(67,5)

packages\Microsoft.Net.Compilers.1.0.0\tools\Microsoft.CSharp.Core.targets (67, 5)

要更precise,这是所描述的问题。

To be more precise, this is the problem being described.

在Microsoft。codeAnalysis.BuildTasks.Csc任务无法从组件加载C:\\a\\1\\s\\packages\\Microsoft.Net.Compilers.1.0.0\\build..\\tools\\Microsoft.Build.Tasks.$c$cAnalysis.dll.无法加载文件或程序'file:///C:\\a\\1\\s\\packages\\Microsoft.Net.Compilers.1.0.0\\tools\\Microsoft.Build.Tasks.$c$cAnalysis.dll'它依赖或1。该系统找不到指定的文件。确认声明是正确的,该程序集及其所有依赖都可用,该任务包含实现Microsoft.Build.Framework.ITask一个公共类。

The "Microsoft.CodeAnalysis.BuildTasks.Csc" task could not be loaded from the assembly C:\a\1\s\packages\Microsoft.Net.Compilers.1.0.0\build..\tools\Microsoft.Build.Tasks.CodeAnalysis.dll. Could not load file or assembly 'file:///C:\a\1\s\packages\Microsoft.Net.Compilers.1.0.0\tools\Microsoft.Build.Tasks.CodeAnalysis.dll' or one of its dependencies. The system cannot find the file specified. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.

所以,看样子,我有一些放在本地文件使编制工作的网站上(即我的机器),但使用签入那些没有部署。我没有把任何DLL或手动等到我的项目。一切的存在或具有包管理器获得这两个源$ C ​​$ C。

So, evidently, I have some locally placed files making the compilation work on site (i.e. my machine) but those aren't deployed using check-in. I haven't put in any DLLs or such manually into my project. Everything that's there is either source code based or obtained with the package manager.

这带来以下问题。


  1. 我不知道它的确切文件那些(在Visual Studio在线错误信息没有披露这些信息,我不能在本地重现)。

  2. 我不知道如何将所有相关的文件forcingly推到资源库建设代理获取(OT根据我的经验,它自动地完成)。

在构建步骤设置如下:


  • 解决方法: ** \\ * SLN

  • 的MSBuild参数: / P:DeployOnBuild = TRUE / ​​P:WebPublishMethod =封装/ P:PackageAsSingleFile = TRUE / ​​P:SkipInvalidConfigurations = TRUE / ​​P:PackageLocation =$(build.artifactstagingdirectory)\\ \\

  • 平台:

  • 配置:

  • 清理:关闭

  • 恢复的NuGet软件包:检查

  • 的Visual Studio版本:的Visual Studio 2015年

  • 的MSBuild架构:的MSBuild 86

  • 录制项目详情:检查

  • Solution: **\*.sln
  • MsBuild Arguments: /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)\\"
  • Platform:
  • Configuration:
  • Clean: off
  • Restore NuGet Packages: checked
  • Visual Studio Version: Visual Studio 2015
  • MsBuild Architecture: MSBuild x86
  • Record Project Details: checked

推荐答案

时的NuGet包中版本控制进行检查通常会出现此问题。删除版本控制软件包的文件夹,并确保packages.config文件被选中的版本控制。然后排队一个新的版本。

This issue usually occurs when the nuget packages are checked in to Version Control. Delete the packages folder in Version Control, and make sure the "packages.config" file is checked in to Version Control. Then queue a new build.

这篇关于建立在Visual Studio在线缺失的软件包的错误(2015年版)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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