03-27-2013 12:50 PM
I have built a small app on my dev machine (Win 7) using the Measurement Studio template as a start. The app runs fine in VS2010.
I have added setup and deploy project as in tutorials given here.
I then attempt to deploy to a new machine (XP SP3 with .NET4 installed) using the msi created. When I run the new program, I get the following 2 errors in the event viewer:
1st Error:
EventType clr20r3, P1 deploytest.exe, P2 1.0.0.0, P3 5153278a, P4 nationalinstruments.common, P5 13.0.40.188, P6 510739cb, P7 fdd, P8 12, P9 system.io.filenotfoundexception, P10 NIL.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
2nd Error:
Application: DeployTest.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileNotFoundException
Stack:
at NationalInstruments.Restricted.LicenseBase.RunTimeCheck(System.ComponentModel.LicenseContext, System.Type, System.Object)
at NationalInstruments.Restricted.LicenseProviderBase.GetLicense(System.ComponentModel.LicenseContext, System.Type, System.Object, Boolean)
at System.ComponentModel.LicenseManager.ValidateInternalRecursive(System.ComponentModel.LicenseContext, System.Type, System.Object, Boolean, System.ComponentModel.License ByRef, System.String ByRef)
Other information: I orginally had the enterprise evaluation on my Dev computer, then purchased the licensed Professional Version, which I have installed, and updated the lic files accordingly.
What do I need to do to fix this problem?
Thanks,
Mark
03-28-2013 10:47 AM
Hey markmarr,
We sometimes see the FileNotFound exceptions when the incorrect version of the NationalInstruments.Common DLL is referenced in the project. Could you check the reference to that DLL in your VisualStudio project, and see what other options are available to you besides the one you have selected?
It's possible that installing the enterprise evaluation included other versions of the NationalInstruments.Common DLL, or there could be other versions of the DLL from having previous versions of Measurement Studio on the machine. If the wrong version of the DLL is referenced (and included) in the build, this error can result.
Please let us know if you need any more assistance with it! Having those version numbers of the DLL and any available options should be helpful for troubleshooting further.
03-28-2013 03:09 PM
Thanks for the reply
I have made that problem go away, but now I have new problem..
This is a winform app... but it appears that NI files need system.web assembly to check license?
I've just uploaded and installed .net 4.0 on this machine, and I get this error.
Any help?
Thanks.
Here's the dump from the error:
System.IO.FileNotFoundException: Could not load file or assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at NationalInstruments.Restricted.LicenseBase.RunTimeCheck(LicenseContext context, Type type, Object instance)
at NationalInstruments.Restricted.LicenseProviderBase.GetLicense(LicenseContext context, Type type, Object instance, Boolean allowExceptions)
at System.ComponentModel.LicenseManager.ValidateInternalRecursive(LicenseContext context, Type type, Object instance, Boolean allowExceptions, License& license, String& licenseKey)
at System.ComponentModel.LicenseManager.Validate(Type type, Object instance)
at NationalInstruments.Restricted.AnalysisLicenser..ctor()
at NationalInstruments.Analysis.Monitoring.PeakDetector..ctor(Double threshold, Int32 width, PeakPolarity peakPolarity)
at NationalInstruments.Analysis.Monitoring.PeakDetector..ctor()
at DeployTest.Form1.button1_Click(Object sender, EventArgs e)
at DeployTest.Form1.cbX_CheckedChanged(Object sender, EventArgs e)
at System.Windows.Forms.CheckBox.OnCheckedChanged(EventArgs e)
at System.Windows.Forms.CheckBox.set_CheckState(CheckState value)
at System.Windows.Forms.CheckBox.OnClick(EventArgs e)
at System.Windows.Forms.CheckBox.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.296 (RTMGDR.030319-2900)
CodeBase: file:///c:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
DeployTest
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files/AccellDeploy2/DeployTest.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1002 built by: RTMGDR
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e0...
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1001 built by: RTMGDR
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/Sys...
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1001 built by: RTMGDR
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a...
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System....
----------------------------------------
System.Windows.Forms.DataVisualization
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.DataVisualization/v4.0_4.0.0...
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System...
----------------------------------------
System.Data
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.D...
----------------------------------------
NationalInstruments.Analysis.Professional
Assembly Version: 13.0.40.242
Win32 Version: 13.0.40.242
CodeBase: file:///C:/Program%20Files/AccellDeploy2/NationalInstruments.Analysis.Professional.DLL
----------------------------------------
System.Numerics
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/Sy...
----------------------------------------
NationalInstruments.Common
Assembly Version: 13.0.40.188
Win32 Version: 13.0.40.188
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/NationalInstruments.Common/v4.0_13.0.40.188__dc6a...
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
03-29-2013 08:54 AM
Hey Mark,
You're right; it does appear as though it's looking for the System.Web assembly. One thought would be to manually include a reference to that assembly in the project--that might help the build process correctly find the assembly.
Another tool available to us for debugging these sorts of issues is the fusion log, which provides a more detailed view of where Visual Studio is looking for these assemblies and what might be going wrong with that. You can find instructions for creating a fusion log here: https://decibel.ni.com/content/people/nickb/blog/2009/06/16/using-fusion-logs-to-debug-net-assembly-...
Seeing that log might be helpful toward tracking this issue down. Let us know how it goes!