NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

.NET assembly requires app.config file, can't find it when called from TestStand

I have created an assembly that uses SubSonic (a DAL creation tool - http://www.subsonicproject.com).  It works just fine.  I can create (.NET) applications that access this assembly (provided I setup their app.config correctly).  All is good in the world.  Unfortunately, the primary use of this assembly is that is is called from TestStand.  I can call any functions in the assembly and they all work EXCEPT when the assembly tries to hit a database.  Here is the exception that gets thrown:

 

The .NET method 'StoreTestResults' threw an exception.

Can't find the SubSonicService section of the application config file
Source:  SubSonic   at SubSonic.DataService.LoadProviders() in C:\svn\subsonicproject\trunk\SubSonic\DataProviders\DataService.cs:line 196
   at SubSonic.Select..ctor() in C:\svn\subsonicproject\trunk\SubSonic\SqlQuery\Select.cs:line 41
   at DAL.DC4DAL.StoreTestResults(SequenceContext seqContext) in C:\Projects\ProductionTest\Main\Source\Main\Source\DAL\DAL\DAL.cs:line 95

 

I have done a lot of searching, and the only solution to this I have found is to create an app.config file for the application.  Unfortunately, TestStand does not have an app.config for me to modify, nor did creating a new one (with the names app.config, SeqEdit.app.config, or SeqEdit.exe.app.config) solve the problem.  So, how do I get this to work?  The DAL needs to read the connection string and other information from the .config file.

0 Kudos
Message 1 of 2
(4,272 Views)

Hi rcldesign,

 

Your attempts were very close to creating the config file correctly. I went to www.ni.com and entered "teststand config" in the search field and found a KnowledgeBase article that explains how to create a config file for TestStand.

 

How Can I Force TestStand to Use a Version of the .NET Framework Other Than Version 2.0?

 

Basically all you need to do is name the file SeqEdit.exe.config and place it in the <TestStand>\Bin directory. 

Manooch H.
National Instruments
0 Kudos
Message 2 of 2
(4,242 Views)