1

I recently added a test project to an ASP.NET 5.0 project. The tfs build server is unable to find assemblies for my test project. project.json file below

{
  "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": { }
  }
}

The build outputs errors as such.

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

The build command is as follows:

C:\Users\build.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta5\bin\dnx.exe --appbase "C:\Builds\2\A\CI_Config\src\Config\ConfigSvc\ConfigSvcTests" "C:\Users\build.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta5\bin\lib\Microsoft.Framework.PackageManager\Microsoft.Framework.PackageManager.dll" pack "C:\Builds\2\A\CI_Config\src\Config\ConfigSvc\ConfigSvcTests" --configuration Release --out "C:\Builds\2\A\CI_Config\bin"

my project doesnt reference most of these assemblies. I'm curious as to where the tfs build agent is looking for the assemblies. Maybe I am missing something crucial here about dependencies with the project.json file

1
  • Have you seen this post by david fowler? Commented Aug 20, 2015 at 21:48

1 Answer 1

0
  1. With regard to the dependencies, those mostly look like dependencies of Microsoft . AspNet . Mvc which is in your dependency list. As I understand it you only reference the top level dependencies in your project.json and the lower level dependencies are worked out. I think that is what you are seeing. InVS 2015 you can drill down on the dependencies.
  2. To the error: I have not tested it but it seems likely you are running into issues because you are referencing beta6 but are using beta5 dnx in your build command.

Some useful links:

  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/
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.