algorithmic modeling for Rhino
I am building a GH plug in that uses a custom WPF interface that I've compiled as an exe. When referencing it in to a C# scripting component, it works fine as long as I also include a series of other .dlls it depends on. When I try to build a GH plug-in that references the same .exe, it produces the following errors on load:
Object: LaunchWindow_Component (level 1)
{
Exception has been thrown by the target of an invocation.
TargetInvocationException
}
Object: LaunchWindow_Component (level 2)
{
Could not load file or assembly 'WPFApplication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
FileNotFoundException
}
I am setting the gha project to "copy local" the exe and its associated dll dependencies, and copying them into the GH libraries folder. I have tried launching GH both with and without COFF loading enabled, but these errors persist.
The exe and GH component both are compiled against .NET 4.0. Any thoughts as to what the difference between an assembly reference in a scripting component and a gha might be? Any thoughts on how to solve?
Tags:
Hi Andrew,
Not sure if this will help, but you could try appending the dll locations to the user or system path. I've had some similar issues when referencing 3rd party dlls from a Rhino plugin vs. from the VS debugger.
Thanks for the suggestion Daniel... I think I figured it out. I think it WAS ultimately a COFF loading issue - it had to be disabled for the EXE reference to work. I thought I had successfully done this but apparently I hadn't.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by