NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Teststand fails to use app with custom user settings

Solved!
Go to solution

Hello,

 

For a teststand project, I have to use an .Net application that is using a custom settings provider. The problem with it is that each time it is trying to use one of the user setting from teststand, the application returns an exception:

"Failed to load provider type".

 

I tried to illustrate with the small demo project that I attached.

The .Net application I call from test stand is AppWithUserSetting, and one of the step in the sequence File q.seq is to get a value of a user setting. That's where it crashes for me.

On the other hand, if I instantiate the same objects and read the same user setting from another .Net application (DoLikeTestStandApp), everything is fine.

 

Note that in the settings.designer.cs file of AppWithUserSetting, a custom line was added ([global::System.Configuration.SettingsProvider(typeof(AppWithUserSettings.UserAppSettingsProvider))] ) to force the program to use the custom SettingProvider. And that's where it fails when loading from teststand.

 

Any idea why? At this time, I would rather not remove the usage of that  custom settingProvider since it allows to keep user settings even when upgrading to different version of AppWithUserSettings.

 

Thanks and regards,

Loic

 

PS: I am using VS studio 2008 SP1 and Teststand 4.1.1

 

 

 

0 Kudos
Message 1 of 7
(4,326 Views)

Dear Loic.

 

Thank you so much for your post on our webforum and the great example. I noticed the problem and a few day back I forwarded this to my colleagues in the US. This is not the behaviour we suspected so the issue will be reviewed by our R&D team. I will inform you when I have any more news.

 

Best regards,

Martijn S
Applications Engineer
NI Netherlands
0 Kudos
Message 2 of 7
(4,267 Views)

Martijn,

Thanks for looking into the issue.

Best regards,

Loic 

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

I believe you are running into the same problem as this poster:

 

http://forums.ni.com/ni/board/message?board.id=330&thread.id=27317&view=by_date_ascending&page=1

 

Please read the posts and see if any of this information is helpful in solving your problem.

 

-Doug

Message 4 of 7
(4,239 Views)
Solution
Accepted by topic author chouch

Loic -

 

As Doug mentioned, you are indeed running into an issue similar to the one in the other forum thread he pointed to. I have gone ahead and implemented the workaround solution for this issue in your provided example and attached it below.

 

Hope this helps. Let me know if you have any questions.

Manooch H.
National Instruments
Message 5 of 7
(4,212 Views)

Loic -

 

I forgot to mention that if you implement this solution after already receiving the error, and you receive the error again, please try closing TestStand and re-starting it.

Manooch H.
National Instruments
0 Kudos
Message 6 of 7
(4,210 Views)

Manooch,

 

Great! Thanks for the workaround it works perfectly.

 

Regards,

Loic 

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