10-21-2015 07:17 AM
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?
Solved! Go to Solution.
10-21-2015 08:54 AM
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/
09-20-2019 09:48 AM
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
09-20-2019 11:19 AM
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.
09-23-2019 01:54 AM
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.
09-23-2019 09:25 AM
And your executable is called "application.exe"?
09-24-2019 07:25 AM
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.