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!
Build/Test Issues
Dependency on native binary built as part of the same solution?
Started by Onto Innovation on 1,897 views
Remco NCrunch Developer
#15654
21 Sep 2021 00:55 UTC
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?
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?
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.
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 NCrunch Developer
#15656
21 Sep 2021 02:05 UTC
Onto Innovation 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.
Deleted post
#15764
01 Nov 2021 03:40 UTC
Post a reply
Log in to reply.