03-09-2011 01:53 AM
Hello,
i have a problem with a .NET dll. This dll has a search for a ini File. This Ini File and all the dll must be in the Place were they called.
I have copy all the data were the vi is saved but it didn't work.
If i made a EXE with the Application Builder and copy the dll's and ini were the Exe is saved it worked everything fine.
What can i do that the function runs in the vi too?
03-09-2011 10:55 AM
@Tumbler81 wrote:
Hello,
i have a problem with a .NET dll. This dll has a search for a ini File. This Ini File and all the dll must be in the Place were they called.
I have copy all the data were the vi is saved but it didn't work.
If i made a EXE with the Application Builder and copy the dll's and ini were the Exe is saved it worked everything fine.
What can i do that the function runs in the vi too?
Most likely the .Net DLL does not check for its file path location but for the location of the process file that created the current process. For a LabVIEW development session this would be the directory in which LabVIEW.exe resides. Try to copy that file in this directory to see if that is the issue. If it is you should ask the developer of the .Net library to change that, since this is a very useless and in modern OSes mostly impossible way of operation, if you don't want to modify permissions in the file hierarchy.
03-09-2011 11:17 PM
Thanks for your information. But i have tried this but it doesn't work.
03-10-2011 08:05 AM
Hi Tumbler81,
can you give more information about the version of your LabVIEW and .NET Framework that you are using.
Because there are some things which you have to take care of by using .NET Framework 4 and LabVIEW for example.
03-10-2011 08:08 AM
Hi TobiS,
I'm using LabView 2010 and .NET Framework is installed from 1 to 4.
The .NET dll ist wrote in .Net Framework 2
03-10-2011 09:38 AM
Hi,
the thing is LabVIEW 2010 doesn't natively support .NET Framework 4.
But maybe there is an way how to make LabVIEW to deal with it:
http://digital.ni.com/public.nsf/allkb/32B0BA28A72AA87D8625782600737DE9?OpenDocument
Let me know if this helped you!
03-10-2011 11:28 PM
Hi TobyS,
if i youse the Config Text from your link I can't youse the DLL.
I have changed the Config Text
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v2.0.50727"/>
</startup>
</configuration>
but it doesn't work
03-11-2011 06:19 AM
Your problem is not about loading the right ,Net or CLR but about where your .Net component looks for the file. Without proper documentation about that all you can do is trial and error by moving that file around.
03-15-2011 05:15 AM
Hi Tumbler81,
sorry for my late reply, do you have any news about your problem?
Did you try to move the files to the same location like rolfk intened.
Or can you describe the problem more detailed?
03-15-2011 05:18 AM
Sorry at the moment i didn't trie anything. I've got a new dll that show me the path were the dll is searching. but i dind't use this.
So i coudn't say anything. If i got news i will post it here