05-01-2010 09:07 AM
Greetings all..
I can't seem to get any VS2005 applications that contain any Measurement Studio controls to install on Win7 or XP64. All the other XP machines I try work fine. . also any applicaiton I build and install without Measurement Studio using other component supplier, or controls work with no issues.
I am using the VS2005 deployment projects and making sure I include the merge modules as described in the Measurment Studio help sections. I think I see the problem is that Win7 is looking for a different version of the NI controls than the one the deployment project is installing. The dll's in the application and the application directory match the versions listed in the Fusion log. Tried several machines to do the build, but same problem..any ideas? Amhaving a permissions issue that the GAC is not being updated by my deployment package?
Included below are thefusion log and GAC listing for NI MS.
Thanks,
Ned Bennett
GDS-Software
Fusion Log
*** Assembly Binder Log Entry (5/1/2010 @ 9:48:28 AM) ***
The operation failed.
Bind result: hr = 0x8007000b. An attempt was made to load a program with an incorrect format.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
Running under executable C:\Program Files (x86)\Win7TestingNoLVSetup\Win7TestingNoLV.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: User = StudioGDS\ned
LOG: DisplayName = NationalInstruments.UI.WindowsForms, Version=8.9.20.246, Culture=neutral, PublicKeyToken=4544464cdeaab541
(Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/Win7TestingNoLVSetup/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = Win7TestingNoLV.exe
Calling assembly : Win7TestingNoLV, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: Post-policy reference: NationalInstruments.UI.WindowsForms, Version=8.9.20.246, Culture=neutral, PublicKeyToken=4544464cdeaab541
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Win7TestingNoLVSetup/NationalInstruments.UI.WindowsForms.DLL.
LOG: Assembly download was successful. Attempting setup of file: C:\Program Files (x86)\Win7TestingNoLVSetup\NationalInstruments.UI.WindowsForms.dll
LOG: Entering run-from-source setup phase.
LOG: Assembly Name is: NationalInstruments.UI.WindowsForms, Version=8.9.20.246, Culture=neutral, PublicKeyToken=4544464cdeaab541
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.
(Gac listing)
NationalInstruments.Common 8.9.20.156 neutral 4544464cdeaab541
NationalInstruments.Common.Native 8.9.20.156 neutral 4544464cdeaab541
policy.8.0.NationalInstruments.Common 8.9.20.156 neutral 4544464cdeaab541
policy.8.1.NationalInstruments.Common 8.9.20.156 neutral 4544464cdeaab541
policy.8.1.NationalInstruments.Common.Native 8.9.20.156 neutral 4544464cdeaab541
policy.8.5.NationalInstruments.Common 8.9.20.156 neutral 4544464cdeaab541
policy.8.5.NationalInstruments.Common.Native 8.9.20.156 neutral 4544464cdeaab541
policy.8.6.NationalInstruments.Common 8.9.20.156 neutral 4544464cdeaab541
policy.8.6.NationalInstruments.Common.Native 8.9.20.156 neutral 4544464cdeaab541
policy.8.7.NationalInstruments.Common 8.9.20.156 neutral 4544464cdeaab541
policy.8.7.NationalInstruments.Common.Native 8.9.20.156 neutral 4544464cdeaab541
policy.8.9.NationalInstruments.Common 8.9.20.156 neutral 4544464cdeaab541
Solved! Go to Solution.
05-03-2010 08:30 AM
There might be more than 1 issue here, but I think that they have the same root cause - you are running a 64-bit app on 64-bit OSs and referencing MStudio assemblies that do not support being loaded in 64-bit processes.
1) I see that the error code that is returned is:
hr = 0x8007000b. An attempt was made to load a program with an incorrect format.
This can happen if you run a 64-bit program that tries to load an assembly that supports being loaded only in a 32-bit process. Measurement Studio for VS2005 supports only 32-bit. I can see that your application references MStudio for VS2005 assemblies by virtue of the ".20" in the version number (.20 means the assembly supports .NET Framework 2.0).
When you state that this fails on Win7 - is this Win7 32-bit, 64-bit, or both?
If only 64-bit, you could try to rebuild your application with Target Platform set to x86 to see if this fixes the problem.
Then, you need to decide whether you need your application to run as a 64-bit process on 64-bit OSs. If so, you'll need to use MStudio 2009 for VS2008 to get this 64-bit support.
2) It looks like the MStudio UI assemblies are not in the GAC. How did you generate the GAC listing? Did you navigate to the GAC using Windows Explorer, or did you use the command line? If the command line, which GAC sub-directory did you navigate to (e.g., GAC, GAC_32, GAC_MSIL)?
David Rohacek
National Instruments
05-03-2010 11:14 AM
David:
Thanks for the quick response. Changing the compile options to x86 did the trick. The application now loads onWin7 64bit and I will test on XP 64 later, but I expect they will work there as well.
I always use mscorcf.msc to look at the GAC. Is there a better method?
Appreciate the help!
Ned Bennett
GDSSoftware
05-05-2010 08:25 AM
I've only ever used mscorcf.msc to configure security settings. I'm not aware of any shortcomings of it for browsing the GAC. It looks like Microsoft is no longer providing mscorcf.msc with .NET 4.
I typically use Windows Explorer when I need a quick view of what is installed and I use the command line if I need to examine items in more detail or hack at what is in the GAC.
David Rohacek
National Instruments
05-05-2010 10:38 AM
GDSoftware,
Is your Windows 7 machine 32-bit or 64-bit? Is it possible that the application is not compatible with 64-bit OS'? Have you considered using XP Mode / Virtual PC to install the app on your Win 7 machine? To learn more about XP Mode / Virtual PC, please see the following link: http://www.microsoft.com/windows/virtual-pc/download.aspx
Jessica
Microsoft Windows Client Team