我最近在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文件的依赖关系的重要内容
答案 0 :(得分:0)
一些有用的链接: