Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

National Instruments Measurement studio 8.0 for visual studio 2005 supported OS

Hello,

 

We have the Licensed version of National Instruments Measurement studio 8.0 for visual studio 2005.

 

We need to use it on the Windows 7 platform. It gets installed successfully, but during execution generates the exception which says:

 

Error 2 The command "rem Begin Measurement Studio Licensing for x64

rem Do NOT modify contents between 'Begin Measurement Studio Licensing for x64' and 'End Measurement Studio Licensing for x64'
rem For more information, refer to Protecting Your Project from LC0000 Build Error (ms-help://MS.VSCC.v80/MS.VSIPCC.v80/NI.MeasurementStudio.2005/MStudioIntegration/XML/Protect_LC0000_Error.html) in the NI Measurement Studio Help.
if exist %WINDIR%\Microsoft.NET\Framework64\v2.0.50727\ %WINDIR%\Microsoft.NET\Framework64\v2.0.50727\ldr64.exe setwow
rem End Measurement Studio Licensing for x64

" exited with code -1.

 

Kindly suggest the solution.

 

Regards,

Naureen.

0 Kudos
Message 1 of 5
(6,628 Views)

Naureen,
Can you confirm which version of Measurement Studio you are using? Measurement Studio 8.0 requires Visual Studio 2003, but 8.0.1 requires Visual Studio 2003 or 2005, which leads me to believe you are using Measurement Studio 8.0.1.


Please keep in mind that Measurement Studio 8.0 and 8.0.1 do not provide support for Windows 7. The supported operating systems are Microsoft Windows 2000/XP/XP x64. Therefore, we can not guarantee that Measurement Studio 8.0 or 8.0.1 will run on Windows 7.


Be sure that the Microsoft .NET Framework 2.0 is installed as well.

Jared A.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(6,612 Views)

I ran across this thread and saw that the solution had not been posted. The error message actually points you to a help topic which I have posted below. Keep in mind that you will need to run Visual Studio as Administrator (right-click Visual Studio 2005 in the Start menu and select Run as Administrator from the context menu).

 

 

Protecting Your Project from LC0000 Build Error

 

The licensed Measurement Studio .NET libraries are not 64-bit-compatible; therefore, when lc.exe runs as a 64-bit application on a 64-bit Windows OS during Visual Studio 2005 project build time, the project fails to build because lc.exe is trying to instantiate the Measurement Studio types in 64-bit mode. This issue is a confirmed Microsoft bug. For more information, refer to Microsoft Knowledge Base article 913961 on the support.microsoft.com Web site.

 

This issue causes Visual Studio 2005 to display the following error:
LC: error LC0000: 'Could not load file or assembly file:///<installdir>\MeasurementStudioVS2005\DotNET\Assemblies\Current\NationalInstruments.UI.WindowsForms.dll or one of its dependencies. An attempt was made to load a program with an incorrect format.'

 

Resolving LC0000 Build Error

You can use Measurement Studio integrated tools to protect your project or you can manually protect your project from LC0000 build error.

Note:
You must be logged in to Windows Vista as an Administrator to resolve LC0000 build error with Measurement Studio integrated tools or to resolve the build error manually.

 

Using Measurement Studio Integrated Tools to Resolve LC0000 Build Error

Measurement Studio integrated tools automatically protect your project from LC0000 build error in the following ways:

  • Any new Measurement Studio .NET projects you create are protected from this error.
  • When adding a Measurement Studio licensed library to your project with the Add/Remove Class Libraries Wizard, your project is updated to protect against this error.
  • When you open an unprotected project, you are prompted to protect your project.
  • You can update your projects on demand using the Add 64-Bit Protection to Project and Remove 64-Bit Protection to Project menu items.

If you do not want Measurement Studio integrated tools to automatically update your project, you can disable the LC0000 error protection.

  1. Select Tools»Options to launch the Options dialog box.
  2. Expand the Measurement Studio node and select General.
  3. Set Add 64-Bit Protection to Project to False.

Manually Resolving LC0000 Build Error

Complete the following steps to manually protect your project from LC0000 build error.

  1. Confirm that you are logged in to Windows as an administrator.
  2. In the Solution Explorer, right-click your project name, and then select Properties.
  3. Click Build Events, and then call the following in the pre-build event command line box: %windir%\Microsoft.NET\Framework64\v2.0.50727\ldr64.exe setwow
  4. Call the following in the post-build events command line box: %windir%\Microsoft.NET\Framework64\v2.0.50727\ldr64.exe set64

Issues with the License Compiler

When a Visual Studio 2005 project with licensed components is built, Visual Studio runs an application called lc.exe (license compiler). When the license compiler runs at build time, the compiler reads the licenses.licx file included in the project, instantiates each type in the file, and then asks each type for its license. The resulting licenses are combined into a resource file by lc.exe. Then, Visual Studio takes this resource file of licenses and embeds it into the resulting application that is being built.

The license compiler application is a managed application, built against Microsoft .NET Framework 2.0 and built with the platform target set to any CPU, that executes inside the Common Language Runtime (CLR). Applications built against .NET Framework 2.0 and built with the platform target set to any CPU, run as 64-bit applications when executing on a 64-bit Windows OS and run as 32-bit applications when executing on a 32-bit Windows OS. The lc.exe application exhibits this dual behavior, which is problematic for .NET components that are not 64-bit-compatible.

National Instruments
Message 3 of 5
(6,539 Views)

I was getting this issue too.  Granted, I should upgrade both my visual studios and measurement studios (still on 2010 and have 2013 cd sitting here), but the issue in Window 7 is that MS pretty much locked out program access to C:\ and C:\Windows\, so the command %windir%\Microsoft.NET\Framework64\v2.0.50727\ldr64.exe setwow doesn't work unless you run visual studios as admin.  Not just logged into Windows with an system admin account, but also tell UAC to run Visual Studios as admin.  That cleared it up without having to change any of the build commands or target CPU.

0 Kudos
Message 4 of 5
(6,272 Views)

I have the same problem. But when I run Visual Studio as Administrator, this error disappear.

0 Kudos
Message 5 of 5
(4,271 Views)