So I have a bit of a dilemma that I'm struggling with. I found an neat function on the community that does what I want and uses a .Net 4.0 control. I don't actually need the control to be seen, just be available to call into some system level functions. It works great when in a project but I want to wrap this up into a reusable function, and put it on the palette with VIPM. The problem is a VI on the palette isn't in a project, and according to this document "National Instruments strongly recommends that you always put VIs that use .NET objects in a project." But if it isn't, then the .Net DLL needs to be loaded from "The directory that contains LabVIEW.exe".
What I think the article means is is needs to be found in the search path setup by LabVIEW and a default one will fine DLLs placed anywhere under the install folder. So in my case putting the DLL under the user.lib will work just fine in source. But if I go to build a VIPM package, it will automatically build in the dependencies to a path that won't really exist, and then dropping it on the palette will result in a broken VI. It seems to be looking for the DLL in a directory named <Package>_internal_deps and the control is broken.
I can look into finding ways to perform this same function using non-.Net controls and DLLs, but I'd like to know the best way to try to have a function on the palette, that uses a .Net control for future reuse functions. Any suggestions? Thanks.
EDIT: And for bonus points, is there any complications when dealing with making applications? I'd really just like to drop this VI from the palette into my code, and then when I build an EXE it knows the dependencies and includes the .Net control DLL. At the moment it seems I need to specify to always include the DLL, and I need to make sure it is in a folder called "data" next to my EXE. I typically have the application builder settings rename this Support Directory to "Support" but that doesn't seem to be good enough for .Net and I need a seperate folder called data with the DLL in there. Please tell me there is a reason for all of this madness, and that it is Microsofts' fault.