Archived: Why do I Receive an Error when Using Visual Studio 2010 to Build a TestStand User Interface?This document has been archived and is no longer updated by National InstrumentsPrimary Software: Primary Software Version: 4.0 Primary Software Fixed Version: N/A Secondary Software: N/A
Problem: I have a Visual Studio project that targets the .NET 2.0 3.5 Framework and contains a Windows Form with TestStand User Interface (UI) controls. When I attempt to build this project in Visual Studio 2010 on a Windows 64-bit operating system I receive the error: Could not load file or assembly 'file:/// C:\Program Files (x86)\National Instruments\TestStand\API\DotNet\Assemblies\CurrentVersion\ NationalInstruments.TestStand.Utility.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format. ![]() How can I resolve this error and successfully build my project? Solution: This issue exists for TestStand 2010 SP1 and previous versions on Windows 64-bit operating systems. You will encounter this build error in the following situations:
You will not encounter this error if your project targets the .NET 4.0 Framework or if you convert an existing project to Visual Studio 2010 and rebuild it without making edits. This behavior occurs because of a known issue in Visual Studio 2010. If modifying your project to target the .NET 4.0 Framework is not an option for you, please visit the Microsoft KnowledgeBase listed below for other workarounds. Related Links: Microsoft KB 2028833: MSBuild 4.0 or Visual Studio 2010 may fail to compile a 32-bit application targeted for .Net Framework 3.5, 3.0 or 2.0 on x64 machine. Attachments:
Report Date: 07/21/2011 Last Updated: 09/11/2012 Document ID: 5NK6NKXU |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

