Digital I/O

Showing results for 
Search instead for 
Did you mean: 

Unit test Visual Studio 2010 Digital Input read event

Go to solution



I am experiencing problems in Visual Studio 2010 using NI-DAQmx but ONLY in a unit test project. I compiled a dll which use a Task DigitalChangeDetection event handler. The dll work fine in a regular Form project but isn't working in a Test project.


I used .NET Framework 4.0 everywhere with success. Tried to switch to .NET framework 3.5 but it isn't possible for a test project in Visual Studio 2010.


When I start my test, it works great until the event is fired. Once it does, the test stop without any exception or detail except the following test result:

"The agent process was stopped while the test was running."


Nothing is trapped in debug.


I also get the following error message in the Event Viewer :

Log Name:      Application
Source:        VSTTExecution
Date:          2010-12-01 11:32:31
Event ID:      0
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      xxx
The description for Event ID 0 from source VSTTExecution cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

(devenv.exe, PID 5592, Thread 73) OutOfProcessStrategy.ProcessMonitorThread: Agent process was shut down unexpectedly; will attempt to restart

the message resource is present but the message is not found in the string/message table

Event Xml:
<Event xmlns="">
    <Provider Name="VSTTExecution" />
    <EventID Qualifiers="0">0</EventID>
    <TimeCreated SystemTime="2010-12-01T16:32:31.000000000Z" />
    <Security />
    <Data>(devenv.exe, PID 5592, Thread 73) OutOfProcessStrategy.ProcessMonitorThread: Agent process was shut down unexpectedly; will attempt to restart</Data>



I understand that Visual Studio 2010 is not yet officially supported so here's my 2 questions :


- Am I the only one experimenting this problem? (Easily reproduced by taking the sample project : DotNET3.5\Digital\Read Values\ReadDigChan_ChangeDetection_Events and extract the relevent part to put it in a separate dll so you can try to UnitTest it in a UnitTest project.

- Any update on when NI-DAQmx will be supported by VS2010? (I've read here: that it's supposed to be before the end of the year but any update would be great as I've not been able to find any information about that)


Best regards,



0 Kudos
Message 1 of 4
Accepted by topic author plg

Hello Pierre,


Since NI-DAQmx is not yet offically supported in Visual Studio 2010, its not entirely clear why this issue would occur. At this juncture, the official release date has not yet been announced, however, please continue to check for updates at (Drivers and Updates). Thank you


Best regards


Ali M

Applications Engineer

National Instruments

0 Kudos
Message 2 of 4

Thank you for the update, I'll periodically check for the update.



0 Kudos
Message 3 of 4

ps. I tried with Nidaqmx 9.2.3 and I don't get that problem anymore 🙂

0 Kudos
Message 4 of 4