TFS构建服务器2013上的ASP.NET 5.0构建问题

时间:2015-08-20 20:56:42

标签: tfs visual-studio-2015 asp.net-core

我最近在ASP.NET 5.0项目中添加了一个测试项目。 tfs构建服务器无法找到我的测试项目的程序集。下面的project.json文件

{
  "version": "1.0.0-*",
  "description": "ConfigTests test project",
  "authors": [ "" ],
  "tags": [ "" ],
  "projectUrl": "",
  "licenseUrl": "",

  "dependencies": {
    "Microsoft.AspNet.Mvc": "6.0.0-beta6",
    "xunit": "2.1.0-beta4-build3109",
    "xunit.runner.dnx": "2.1.0-beta4-build134",
    "Moq": "4.2.1507.118",
    "ConfigSvc": "3.0.0-*",
    "FluentAssertions": "3.5.0"
  },
  "commands": {
    "test": "xunit.runner.dnx"
  },

  "frameworks": {
    "dnx451": { }
  }
}

构建输出错误。

Unable to resolve dependency Microsoft.AspNet.Mvc 6.0.0-beta6
Unable to resolve dependency xunit 2.1.0-beta4-build3109
Unable to resolve dependency xunit.runner.dnx 2.1.0-beta4-build134
Unable to resolve dependency Moq 4.2.1507.118
Unable to resolve dependency FluentAssertions 3.5.0
Unable to resolve dependency Microsoft.AspNet.Server.IIS 1.0.0-beta6
Unable to resolve dependency Microsoft.AspNet.Server.WebListener 1.0.0-beta6
Unable to resolve dependency Microsoft.AspNet.StaticFiles 1.0.0-beta6
Unable to resolve dependency Microsoft.AspNet.Diagnostics 1.0.0-beta6
Unable to resolve dependency Microsoft.AspNet.DataProtection 1.0.0-beta6
Unable to resolve dependency Microsoft.AspNet.Authentication 1.0.0-beta6
Unable to resolve dependency Microsoft.AspNet.Authentication.Cookies 1.0.0-beta6
Unable to resolve dependency Microsoft.AspNet.Authentication.OpenIdConnect 1.0.0-beta6
Unable to resolve dependency Microsoft.AspNet.Authentication.OAuthBearer 1.0.0-beta6
Unable to resolve dependency Microsoft.AspNet.Cors 1.0.0-beta6
Unable to resolve dependency Microsoft.Framework.Configuration 1.0.0-beta6
Unable to resolve dependency Microsoft.Framework.Configuration.Json 1.0.0-beta6
Unable to resolve dependency Microsoft.Framework.DependencyInjection 1.0.0-beta6
Unable to resolve dependency Microsoft.Framework.OptionsModel 1.0.0-beta6
Unable to resolve dependency Microsoft.Framework.Runtime 1.0.0-beta6
Unable to resolve dependency Microsoft.Framework.Logging 1.0.0-beta6
Unable to resolve dependency Newtonsoft.Json 7.0.1
Using Assembly dependency framework/fx/mscorlib 4.0.0.0
  Source: C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\mscorlib.dll
Using Assembly dependency framework/fx/System 4.0.0.0
  Source: C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.dll
Using Assembly dependency framework/fx/System.Core 4.0.0.0
  Source: C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.Core.dll
Using Assembly dependency framework/fx/Microsoft.CSharp 4.0.0.0

构建命令如下:

  

C:\ Users \ build.dnx \ runtimes \ dnx-clr-win-x86.1.0.0-beta5 \ bin \ dnx.exe --appbase" C:\ Builds \ 2 \ A \ CI_Config \ SRC \配置\ ConfigSvc \ ConfigSvcTests" " C:\用户\ build.dnx \运行时\ DNX-CLR-双赢x86.1.0.0-β5\ BIN \ lib中\ Microsoft.Framework.PackageManager \ Microsoft.Framework.PackageManager.dll" pack" C:\ Builds \ 2 \ A \ CI_Config \ src \ Config \ ConfigSvc \ ConfigSvcTests" - 配置发布 - 输出" C:\ Builds \ 2 \ A \ CI_Config \ bin"

我的项目并没有引用大多数这些程序集。我很好奇tfs构建代理在哪里寻找程序集。也许我错过了关于project.json文件的依赖关系的重要内容

1 个答案:

答案 0 :(得分:0)

  1. 关于依赖项,那些大多数看起来像依赖项 微软AspNet。 Mvc在你的依赖列表中。就像我一样 了解它你只引用你的顶级依赖关系 project.json和较低级别的依赖关系得到了解决。我认为这就是你所看到的。在InVS 2015中,您可以深入了解 依赖。
  2. 错误:我还没有对它进行测试,但似乎你遇到了问题,因为你引用的是beta6,但是你的beta5 dnx正在使用 build命令。
  3. 一些有用的链接:

    1. http://jameschambers.com/2015/07/asp-net-5-beta-6-is-in-the-wild/
    2. http://www.joshgraham.com/upgrading-from-asp-net-beta-5-to-beta-6/
    3. http://davidfowl.com/diagnosing-dependency-issues-with-asp-net-5/