xunit-tests occasionally throw 'Failed to resolve dependencies for target framework'

Tom Deseyn's Avatar

Tom Deseyn

24 Sep, 2015 07:21 PM

Occasionally my projects fail to execute xunit tests on AppVeyor with an error like this.
System.InvalidOperationException: Failed to resolve the following dependencies for target framework 'DNX,Version=v4.5.1':
   System.Reflection.Extensions 4.0.0.0 (incompatible)
Doing one (or a few) rebuilds of the same revision makes the build succeed.

For example:
https://ci.appveyor.com/project/tmds/tmds-sockjs/build/1.0.0-beta7-77 vs https://ci.appveyor.com/project/tmds/tmds-sockjs/build/1.0.0-beta7-76

  1. Support Staff 1 Posted by Feodor Fitsner on 24 Sep, 2015 07:43 PM

    Feodor Fitsner's Avatar

    Could it be that those packages are not being restored? I can't see nuget restore error though. What version of nuget.exe is used (looks like you are downloading the latest 2.8.x, but looking at logs format it could be 3.x installed on build workers). Is non-zero exit code respected while restoring packages? Try adding dir command before build to see what packages are there. Try enabling verbosity in nuget restore.

  2. Support Staff 2 Posted by Feodor Fitsner on 24 Sep, 2015 07:48 PM

    Feodor Fitsner's Avatar

    I think if it's the same repo you can disable "pull request" event and its status will be updated anyway as AppVeyor updates commit status of associated branch.

  3. 3 Posted by Tom Deseyn on 29 Oct, 2015 07:40 PM

    Tom Deseyn's Avatar

    The issue is resolved. It was caused by broken packages on the aspnetmaster nuget feed which have been removed (see https://github.com/aspnet/dnx/issues/3034#issuecomment-152264276).

    Thanks for your support.

  4. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:01 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac