Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

xunit.runner.utility v2.2.0 "Unable to restore required Nuget packages..."
GreenMoose
#1 Posted : Monday, November 6, 2017 9:39:37 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/17/2012(UTC)
Posts: 503

Thanks: 142 times
Was thanked: 66 time(s) in 64 post(s)
[v3.11.0.9]
I get below error/warning from NCrunch Console tool (in the "Errors/Warnings" tab), however I don't use XUnit (mich might explain why it does not exist in nuget packages folder).
Is this warning "by design" even though I don't use xunit in my test projects? (Only NUnit).

Quote:

Unable to restore required Nuget packages for .NET Core test environment
NCrunch was unable to restore Nuget packages required to build a test environment for this project, due to an unspecified failure when invoking 'dotnet.exe restore'

The following packages need to be restored because they do not exist under the Nuget packages folder for this user profile:

xunit.runner.utility v2.2.0


Thanks.

*Edit: It seems to have gone away on succeeding builds.
Remco
#2 Posted : Monday, November 6, 2017 10:48:06 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 930 times
Was thanked: 1257 time(s) in 1170 post(s)
NCrunch has its own internal list of Nuget packages that are required for operation under .NET Core. Because it's to be expected that a machine may not have all these required packages installed, NCrunch will automatically try to restore them if it detects .NET Core projects are being loaded. At this stage in the lifecycle, it's too early for NCrunch to know whether your projects are using Xunit components, so it tries to restore them anyway. The error message you're seeing indicates that there was a problem when trying to do this restore. Perhaps something went intermittently wrong with the network that prevented the download.

Regardless, in this situation the problem is not serious. The engine will continue to run even though the package couldn't be restored. The error is shown to provide useful information in the event of a downstream problem, which won't appear as you're not using Xunit :)
2 users thanked Remco for this useful post.
GreenMoose on 11/6/2017(UTC), GraemeF on 4/4/2018(UTC)
GraemeF
#3 Posted : Wednesday, April 4, 2018 8:17:28 AM(UTC)
Rank: Member

Groups: Registered
Joined: 5/14/2011(UTC)
Posts: 12
Location: UK

Thanks: 4 times
Was thanked: 2 time(s) in 2 post(s)
I've just spent some time investigating this (and ended up here...) - maybe the error message could be improved to make it clear that it isn't really a problem unless using Xunit? Also, more information about the failure might be useful so we can try to fix it!

G.
Remco
#4 Posted : Wednesday, April 4, 2018 8:37:51 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 930 times
Was thanked: 1257 time(s) in 1170 post(s)
GraemeF;12006 wrote:
I've just spent some time investigating this (and ended up here...) - maybe the error message could be improved to make it clear that it isn't really a problem unless using Xunit? Also, more information about the failure might be useful so we can try to fix it!

G.


Yes, this makes sense. My apologies for the confusing message.
GreenMoose
#5 Posted : Tuesday, October 29, 2019 1:56:24 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/17/2012(UTC)
Posts: 503

Thanks: 142 times
Was thanked: 66 time(s) in 64 post(s)
I just bumped into this again when running build on TeamCity.
Build overview
TCFailure1

Build log
TCFailure2

Is NCrunch reporting this as TeamCity error via service messages? If so, why since it isn't an error? (Project is using NUnit, not xunit).

(I also has enabled "an error message is logged by build runner" for Failure condition enabled on the TC config).

Thanks.
Remco
#6 Posted : Tuesday, October 29, 2019 10:21:06 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 930 times
Was thanked: 1257 time(s) in 1170 post(s)
GreenMoose;13985 wrote:

Is NCrunch reporting this as TeamCity error via service messages? If so, why since it isn't an error? (Project is using NUnit, not xunit).


Internally within NCrunch, this is reported as an error. Because technically, it IS an error ... It's just that in the context of a CI system that doesn't require this library, it isn't an error that requires any effort or attention.

I've noted this down to be looked at. We need to find a better way to handle this and report it. For now, I recommend making sure that this particular package is installed on your CI server so that the error doesn't kick up and fail your build.
1 user thanked Remco for this useful post.
GreenMoose on 10/30/2019(UTC)
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.045 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download