I just got a similar problem, but while running in the IDE.
Message:
System.TypeInitializationException was unhandled
Message="The type initializer for 'NationalInstruments.Analysis.Math.ArrayOperation' threw an exception."
Source="NationalInstruments.Analysis.Enterprise"
TypeName="NationalInstruments.Analysis.Math.ArrayOperation"
StackTrace:
at NationalInstruments.Analysis.Math.ArrayOperation.MaxMin1D(Double[] inputData, Double& maximum, Double& minimum)
at N6Tester.TimePlot.autoScaleTrace(Double[]& darr, Int32 numsamp) in D:\Visual C# 2005\N6Tester\N6Tester\TimePlot.cs:line 175
at N6Tester.TimePlot.makePlot() in D:\Visual C# 2005\N6Tester\N6Tester\TimePlot.cs:line 157
at N6Tester.DataReceiveTask.displayProcess() in D:\Visual C# 2005\N6Tester\N6Tester\DataReceiveTask.cs:line 104
at N6Tester.DataReceiveTask.dataReceiveTask() in D:\Visual C# 2005\N6Tester\N6Tester\DataReceiveTask.cs:line 60
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
My project was working fine until I added a new Form with a few NI components, a Slide and a NumericEdit. After that I got this exception on ArrayOperation.MaxMin1D(), which is not at all releated to the new code.
It is not easy to see from this message whet the problem is. But by clicking on "View detail" I could see this on the InnerException: {"NationalInstruments.Restricted.AnalysisLicenser is unlicensed."}
I then had a look in licenses.licx, and found that the line for Analysis was gone. Putting it back in cured the problem.
What is going on here?