LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.net dll didn't run in Labview but as Executable

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?

0 Kudos
Message 1 of 17
(4,310 Views)

 


@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.

 

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 2 of 17
(4,291 Views)

Thanks for your information. But i have tried this but it doesn't work.

0 Kudos
Message 3 of 17
(4,280 Views)

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.

Kind regards
Tobias S.
0 Kudos
Message 4 of 17
(4,259 Views)

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

 

0 Kudos
Message 5 of 17
(4,256 Views)

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!

Kind regards
Tobias S.
0 Kudos
Message 6 of 17
(4,241 Views)

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

0 Kudos
Message 7 of 17
(4,228 Views)

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.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 8 of 17
(4,211 Views)

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?

Kind regards
Tobias S.
0 Kudos
Message 9 of 17
(4,180 Views)

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

0 Kudos
Message 10 of 17
(4,178 Views)