You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have cloned rhino developer samples inside visual studio 2019 (16.11.3) starting from the opening dialog to clone a project.
Then opened the Rhino.Inside SampleUnitTests & built it, without making any changes (even though the readme.txt suggests to make changes, all these were already done or set correctly).
When I use the Visual Studio built-in unit test running facilities, I first get an error that Grasshopper.dll is not found. I see that all the NuGet packages (rhino.inside, rhinowindows, grasshopper, rhinocommon) are installed in the %USER%.nuget\packages directory, but the dependent DLL's are not copied over to the directory where the unit test runner can find them. So, I copied over all dependent DLLs from nuget packages into the build output directory. Then I get a different error (see below), and I am stuck trying to solve this.
I was hoping to just clone, build and run the unit tests project without any hassle.
System.DllNotFoundException
Unable to load DLL 'RhinoLibrary': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at Rhino.Runtime.InProcess.RhinoCore.InternalStartup(Int32 argc, String[] argv, StartupInfo& info, IntPtr hostWnd)
at Rhino.Runtime.InProcess.RhinoCore..ctor(String[] args, WindowStyle windowStyle, IntPtr hostWnd)
at Rhino.Test.GrasshopperSingleton.InitializeCore() in D:\zandbak\rhino-developer-samples\rhino.inside\dotnet\SampleUnitTests\GrasshopperTests\GrasshopperFixture.cs:line 148
at Rhino.Test.GrasshopperSingleton..ctor() in D:\zandbak\rhino-developer-samples\rhino.inside\dotnet\SampleUnitTests\GrasshopperTests\GrasshopperFixture.cs:line 117
at Rhino.Test.GrasshopperSingleton.get_Instance() in D:\zandbak\rhino-developer-samples\rhino.inside\dotnet\SampleUnitTests\GrasshopperTests\GrasshopperFixture.cs:line 90
at Rhino.Test.GHFileFixture..ctor(String filePath) in D:\zandbak\rhino-developer-samples\rhino.inside\dotnet\SampleUnitTests\GrasshopperTests\GrasshopperFixture.cs:line 24
at SampleGHTests.PrimitivesFixture..ctor() in D:\zandbak\rhino-developer-samples\rhino.inside\dotnet\SampleUnitTests\GrasshopperTests\TestPrimitives.cs:line 17
The text was updated successfully, but these errors were encountered:
Hmm.. after running the Convert sample, I rebuilt the UnitTests sample and now it works.
Is it possible that Rhino.Inside needs to run at least once prior to using it in the unit tests? Otherwise, this can be filed & closed as unreproducible.
Might even be an xUnit issue - when I select menu Test > Run all tests, the tests work. When I run a specific test by clicking its icon next to the code, it doesn't work. I may have mixed these two methods willy nilly, expecting them to do the same.
I have cloned rhino developer samples inside visual studio 2019 (16.11.3) starting from the opening dialog to clone a project.
Then opened the Rhino.Inside SampleUnitTests & built it, without making any changes (even though the readme.txt suggests to make changes, all these were already done or set correctly).
When I use the Visual Studio built-in unit test running facilities, I first get an error that Grasshopper.dll is not found. I see that all the NuGet packages (rhino.inside, rhinowindows, grasshopper, rhinocommon) are installed in the %USER%.nuget\packages directory, but the dependent DLL's are not copied over to the directory where the unit test runner can find them. So, I copied over all dependent DLLs from nuget packages into the build output directory. Then I get a different error (see below), and I am stuck trying to solve this.
I was hoping to just clone, build and run the unit tests project without any hassle.
The text was updated successfully, but these errors were encountered: