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

Notification

Icon
Error

"unable to resolve dependency data for NCrunch internal assemblies"
rleahey
#1 Posted : Friday, July 23, 2021 5:13:19 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 11/18/2019(UTC)
Posts: 4
Location: United States of America

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
I'm dealing with an NCrunch issue - I assure you that I would normally exhaust my online research before posting a question, but I'm in the tight spot of trying to sell my team/managers on the value of NCrunch and need to get this working before my Monday morning demo session.

Visual Studio 2019 (16.10.2)
xUnit 2.4.1
MoQ 4.16.1
NCrunch 4.8.0.3

This is a greenfield solution with multiple projects and I was tasked with getting unit testing up and running. I'm getting xUnit + MoQ projects set up in the solution, but my current NCrunch Test panel looks like

[img=https://drive.google.com/file/d/1ViodIJXgpYn7ksb5b7GgTcNvGLeP7GQ3/view?usp=sharing]Test Panel screenshot[/img]

The recurring issue is described a couple of ways but it looks like the main offense is "NCrunch was unable to restore Nuget packages required to build a test environment for this solution, due to an error: The msbuild command returned exit code 1: "c:\program files (x86)\microsoft visual studio\2019\professional\MSBuild\Current\Bin\msbuild.exe" /t:Restore "C:\<localpath>\Local\NCrunch\29200\PackageRestore\restorePackages.csproj"

I've examined the pages on NCrunch's own site that seem to deal with this, but I've not yet found a solution.
Given the urgency of getting this solved (so as to make NCrunch look good to my bosses) I thought I'd go ahead and ask for help here, so - HELP!
rleahey
#2 Posted : Friday, July 23, 2021 5:17:59 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 11/18/2019(UTC)
Posts: 4
Location: United States of America

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
I just noticed NCrunch 4.9 is out. Downloading now...
rleahey
#3 Posted : Friday, July 23, 2021 5:29:08 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 11/18/2019(UTC)
Posts: 4
Location: United States of America

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Updating NCrunch to 4.9.0.8 didn't seem to change anything.

Also, I neglected to mention that these projects are all targeting .NET 5.
Remco
#4 Posted : Friday, July 23, 2021 11:49:13 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 932 times
Was thanked: 1259 time(s) in 1172 post(s)
Hi, thanks for posting.

This problem is caused when something blocks MSBuild from restoring packages on your machine. This could be due to a firewall or virus scanner, or maybe something in your security settings. The good news is that it's fairly easy to work around it.

Usually the error contains a list of Nuget packages that are required on your machine but couldn't be found by NCrunch.

Create a new solution on your machine with a throw-away .NET Core project. In this project, create references to the versions of the Nuget packages listed in the error message, then let VS build the project. This will force a Nuget restore of the missing packages and hopefully allow NCrunch to work on this solution the next time you try it.
1 user thanked Remco for this useful post.
rleahey on 7/24/2021(UTC)
rleahey
#5 Posted : Saturday, July 24, 2021 6:35:17 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 11/18/2019(UTC)
Posts: 4
Location: United States of America

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Thank you so much for your quick response. I had to do a bit of mucking about in Nuget, but all is now working correctly in time for my demo on Monday. I'm quite pleased. I love NCrunch.

Thanks again.
1 user thanked rleahey for this useful post.
Remco on 7/24/2021(UTC)
andrewjknox
#6 Posted : Friday, October 14, 2022 12:57:23 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 10/28/2013(UTC)
Posts: 3
Location: United Kingdom

Creating new solution and referencing the missing Nuget packages worked for me. Thanks!

Visual Studio 2022 (17.3.6)
NCrunch (4.14.0.7)
Users browsing this topic
Guest
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.054 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download