From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW configuration file .net

Solved!
Go to solution

Hi,

I use TestStand 2012 with an homemade DLL built in .NET. This DLL was made by a third party and to be able to use this DLL, I must place a configuration file (SeqEdit.exe.config) aside the executable of TestStand (SeqEdit.exe). Here is the content of this file

 

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<codeBase version="6.0.0.0" href="C:\Program Files (x86)\OSCAR\Adapter\Bin\Newtonsoft.Json.dll"/>
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

 

So far, everything goes well. My issue is when I want to use the DLL with LabVIEW 2012. I took exactly the same configuration file and place it aside the executable of LabVIEW. Of course I also rename it "Labview.exe.config". But when I run my VI, no method works. It looks like LabVIEW doesn't care of the configuration file.

 

I know we can use the configuration file to force LabVIEW to use a different .NET framework. But does anyone knows if we can put the same content for TestStand and LabVIEW? Where can I find documentation on this?

0 Kudos
Message 1 of 7
(6,128 Views)
Solution
Accepted by topic author JimJob

I fixed my issue

 

The configuration file must be placed aside the LabVIEW project, not the executable. 

 

I found this article http://zone.ni.com/reference/en-XX/help/371361G-01/lvconcepts/config_net_app/

Message 2 of 7
(6,099 Views)

Hello JimJob,


Where exactly did you put the file application.exe.config?
I put it aside next to the .lvproj file and included it in the project. It did not work.

Thanks for your help!

Nischel

0 Kudos
Message 3 of 7
(4,190 Views)

Are you naming it "application.exe.config" or "projectname.lvproj.config"? And are you saying it didn't work when you ran the EXE, or it didn't work when running the main VI from within the project?

 

Including the file in the project itself does nothing at all, it's all about the location of the file on disk.  If you need to have the config file run when the EXE runs, in needs to be in the same folder as the EXE is.

 

0 Kudos
Message 4 of 7
(4,177 Views)

I named it "application.exe.config" and put it next to the exe.

This file needs to be read on the first execution of the application, to configure a SQL Server on the target machine. I want to enable the Role Manager, which is disabled by default in Win 10.

0 Kudos
Message 5 of 7
(4,149 Views)

And your executable is called "application.exe"? 

Rolf Kalbermatter
My Blog
0 Kudos
Message 6 of 7
(4,124 Views)

No, its called "Voltagetest.exe" and the configuration "Voltagetest.exe.config".

 

I also tryed it with the project file: "Voltagetest.lyproj" and "Voltagetest.lvproj.config". Same result.

The config files disappear a few moments after the start of the exe or the main file in the project.

0 Kudos
Message 7 of 7
(4,105 Views)