Measurement Studio Cannot Cast between 2 Identical Types

Updated Jun 6, 2018

Reported In


  • Measurement Studio

Issue Details

My Measurement Studio application gave me an error stating that it could not cast Class [A] to Class [B], but it lists A and B as the same type. However, it also states that one type originates from NationalInstruments.Common, Version 15.1, and the other originates from NationalInstruments.Common version 15.0. I only got this error after updating this computer, what software change would cause this error?


This indicates that the National Instruments .NET assemblies on the computer are different than the .NET assemblies that the application was written with. If the discrepancy is with NationalInstruments.common, then the Measurement Studio runtime should be reinstalled it match the version on the development computer. If the discrepancy is with a National Instruments driver, see National Instruments .NET Support to determine where to find the installer for that driver's .NET support.

Additional Information

If this application works on some computers but not on others, you can copy the .NET assembly from a working computer to a non-working computer. See NI .NET Deployment for information on where the .NET assemblies are located on disk.


Not Helpful