Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a VS2005 ClickOnce package with MS 7.1 controls

Has anyone successfully deployed a Visual Studio 2005 Click Once (or any setup) using Measurement Studio 7.1 controls?  We have done the license patch as listed here and the program compiles and runs fine.  However, when we try to create a deployment (to a remote client), they are getting one of the following errors when trying to access forms that contain the MS controls:

System.IO.FileLoadException: Could not load file or assembly 'NationalInstruments.Common, Version=7.1.0.243, Culture=neutral, PublicKeyToken=4544464cdeaab541' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'NationalInstruments.Common, Version=7.1.0.243, Culture=neutral, PublicKeyToken=4544464cdeaab541'
   at Inhallation.frmExposure.InitializeComponent()
   at Inhallation.frmExposure..ctor()
   at Inhallation.frmMain.menuItem1_Click_2(Object sender, EventArgs e)
   at System.Windows.Forms.MenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.MenuItem.MenuItemData.Execute()
   at System.Windows.Forms.Command.Invoke()
   at System.Windows.Forms.Command.DispatchID(Int32 id)
   at System.Windows.Forms.Control.WmCommand(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.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)

or

************** Exception Text **************
System.IO.FileNotFoundException: Could not load file or assembly 'NationalInstruments.Common, Version=7.1.0.243, Culture=neutral, PublicKeyToken=4544464cdeaab541' or one of its dependencies. The system cannot find the file specified.
File name: 'NationalInstruments.Common, Version=7.1.0.243, Culture=neutral, PublicKeyToken=4544464cdeaab541'
   at Inhallation.frmExposure.InitializeComponent()
   at Inhallation.frmExposure..ctor()
   at Inhallation.frmMain.menuItem1_Click_2(Object sender, EventArgs e)
   at System.Windows.Forms.MenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.MenuItem.MenuItemData.Execute()
   at System.Windows.Forms.Command.Invoke()
   at System.Windows.Forms.Command.DispatchID(Int32 id)
   at System.Windows.Forms.Control.WmCommand(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.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)

We are trying to include everything under the sun in the install package to make this work.  It is correct to assume that this will be loaded on a fresh machine.  Any ideas?  Thank you!




0 Kudos
Message 1 of 2
(3,769 Views)
Hello,

Measurement Studio Common ships with a Publisher Policy file.  This is because everything inherits from common for it's datatypes, etc.  Therefore everyone must use the same version even if they were built at different times and against different versions of Common. What you need to do is somehow inlcude the Policy file located in the GAC.  They are named policy.#.#.NationalInstruments.Common, and contain a DLL and a config file.  These files must be isntalled to the GAC for .NET to pick them up and use them.


I do not know how to do this in ClickOnce.  If you create a setup and deployment project you just include the Common merge module and it does this for you.

Another option that you may be able to deploy better is an App.config file that does all the correct redirecting for your specific application.  I do not know to much about these, but I have heard that they are what Microsoft created to solve this redirecting issues specifically for applications.

I hope this helps, let me know if there is something more I can help with.

Regards,
Jeff
NI
0 Kudos
Message 2 of 2
(3,756 Views)