Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

I get a TypeLoadException WaveformPlot in Measurement Studio for Visual Studio 2005

Solved!
Go to solution

Hey Greg -

 

It's not immediately clear why you're failing in this situation. Because nearly all National Instruments assemblies are built against Common, it is necessary for us to policy all requests for Common up to the latest version installed on the machine.  This appears to be happening exactly as planned on your machine, but it also appears your policy files are out of sync with your installed versions of Common - which we take very careful steps to avoid.

 

Could you please post a screenshot of your GAC showing all your installed versions of NationalInstruments.Common (Similar to what I've attached)?  Also - could you list the National Instruments assemblies your project references and their versions?  Finally, if it would be ok with you - could you please post all of the fusion logs created by your project - even if they are successful they can hold clues to the failure.

 

NickB

National Instruments

0 Kudos
Message 11 of 18
(4,291 Views)

The files and lists you requested are in this zip file.

Greg

0 Kudos
Message 12 of 18
(4,286 Views)

Hmmm... This is curious.  Can you verify that all the files you just attached are from the same machine???

 

The fusion log says that it was unable to load NationalInstruments.Common version 8.5.20.149 from the GAC, but it's very clearly in the GAC from your screenshot.  Also - The fusion logs say UI and UI.WindowsForms loaded 8.1.20.377, but it doesn't look like those versions are in your GAC (I'm just guessing here because I can't see, but your other Measurement Studio assemblies are all version 8.1.20.472/378).

 

NickB

National Instruments

0 Kudos
Message 13 of 18
(4,283 Views)

Oops, sorry, the pictures are from my office machine.  I'll get the correct lists to you asap.

Greg

0 Kudos
Message 14 of 18
(4,281 Views)

Here are the pics.

Greg

0 Kudos
Message 15 of 18
(4,275 Views)
Solution
Accepted by Greg01

Ok - I think I know what's going on.  If I'd have looked a little more closely - the answer was in the very first fusion log you copied onto the forum.

 

From that fusion log, I can tell that the application you're creating has an entry in the application configuration file that redirects versions of NationalInstruments.Common to version 8.5.20.149.  This works fine on the first machine you posted screenshots from, because you have that version installed, but it fails on the second machine because you do not have it installed. 

 

My guess as to why you have that entry in your app.config file is because while building your project, you received the build warning "Found conflicts between different versions of the same dependent assembly".  If you double click on this error - you get the following dialog:

 

NickB11-01, 11_03_05.png

 

If you select yes to this dialog, your app.config file will be modified to redirect all requests for common to the latest version on that machine.  The problem is that if you share this project between multiple machines (such as through SCC), the redirected version may not exist on all machines.

 

The solution is to remove the binding redirect references to NationalInstruments.Common and NationalInstruments.Common.Native in your app.config file.  This will allow our installed publisher policy files to ensure you always get the correct version of NationalInstruments.Common during run time.  You will still get the warning, but it can safely be ignored.

 

Let me know if you have any questions -

 

NickB

National Instruments

0 Kudos
Message 16 of 18
(4,270 Views)

Thanks Nick,

I never would have found that!

Greg

0 Kudos
Message 17 of 18
(4,266 Views)

Thanks man


__________________________________________________
Ford shocks and struts
Toyota quick strut
Nissan quick strut

0 Kudos
Message 18 of 18
(4,226 Views)