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

Notification

Icon
Error

Dependency on native binary built as part of the same solution?
Onto Innovation
#1 Posted : Tuesday, September 21, 2021 12:50:10 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/22/2021(UTC)
Posts: 3
Location: United States of America

Hi,

I have a scenario where a managed assembly that I'm testing depends upon a native dll which is built within the same solution.
For example:

MySolution
-MyNativeProject
-MyManagedProject (uses MyNativeProject.dll via P/Invoke)
-MyMangedTestProject (references MyManagedProject)

I'm unable to run the tests under NCrunch due to MyNativeProject.dll not being built in the NCrunch workspace.

In the NCrunch configuration, I tried adding the MyNativeProject's .vcxproj to the "Copied project dependencies" and "Implicit project dependencies" for both MyManagedProject and MyManagedTestProject, but that did not resolve the issue. I opened the NCrunch workspace in File Explorer, and verified no signs of MyNativeProject or its dll with those configuration changes in place.

I'm not sure what else to try... any ideas appreciated.

Thanks!
Remco
#2 Posted : Tuesday, September 21, 2021 12:55:10 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 847 times
Was thanked: 1145 time(s) in 1069 post(s)
Hi, thanks for sharing this issue.

The Copied Project Dependencies setting is the only way to really resolve this problem in an acceptable way (don't use Implicit project dependencies). With that said, this feature is still very new so it hasn't seen the same level of real world testing as the rest of the product.

It's possible that the setting is experiencing a problem with something specific in your setup. Are you able to get it to work with a minimal sample solution? Or are you able to get it to fail with a self contained sample solution that you might be able to share with me?
Onto Innovation
#3 Posted : Tuesday, September 21, 2021 2:01:04 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/22/2021(UTC)
Posts: 3
Location: United States of America

Thanks for the quick reply.

Please disregard my inquiry. It turns out that the "Copied Project Dependencies" is actually working just fine. After setting that value as you prescribe, I failed to notice that the native project indeed started building, however was failing due to an unrelated problem (that I've since resolved).

My apologies for the red herring.
Remco
#4 Posted : Tuesday, September 21, 2021 2:05:13 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 847 times
Was thanked: 1145 time(s) in 1069 post(s)
Onto Innovation;15655 wrote:

Please disregard my inquiry. It turns out that the "Copied Project Dependencies" is actually working just fine. After setting that value as you prescribe, I failed to notice that the native project indeed started building, however was failing due to an unrelated problem (that I've since resolved).


Thanks for letting me know, and don't feel bad about this. It's the first support request we've had for this feature, which confirms to me that it was actually useful and worth introducing. I'm glad it's working well for you.
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.033 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download