01-15-2013 03:20 PM
AlbertJ,
What if you include the 2010 C++ Runtime as a merge module with your installer? The merge module will be located at \Program Files\Common Files\Merge Modules, and will be called Microsoft_VC100_CRT_x86.msm. If you include that with your installer builds, it should package the vcredist_x86.exe file into your setup.exe.
01-21-2013 08:37 AM
Daniel,
I have the info you asked for about the C++ runtimes running on the win 8 machine. I'm attaching a doc file with a screen shot of the info. I will have acess to the machine for only the next day or so. Any info you can provide that can help me get things installed and running properly will be a great help.
Thanks,
-Steve
01-21-2013 09:39 AM
Thank you Daniel, that worked for me.
Regards,
AJ
01-22-2013 08:56 AM
Albert--Glad to hear it!
Steve--While you have access to the machine, can we get a fusion log of the executable? You can find the instructions here: https://decibel.ni.com/content/people/nickb/blog/2009/06/16/using-fusion-logs-to-debug-net-assembly-...
Also, as to why you were unable to run the vcredist.exe, I suspect that you have the C++ Redistributable 2010 SP1 instead of just 2010. You can find the download for SP1 here: http://www.microsoft.com/en-us/download/details.aspx?id=26999
I would suggest trying that and then running your executable. I'll look forward to hearing how it goes!
01-22-2013 09:43 AM
Daniel,
I need a bit of clarification... do you want me to try the redistributable that does include SP1, or that does not include SP1?
01-22-2013 12:05 PM
Daniel,
The win 8 machine does not have the WinSDK on it so I can't get the fusion logs. Unfortunately, I can't install any tools on that machine because it is used for non-development work and we can't put dev tools on it. The best I can do is install a different version of the C++ redist and see if that helps. As I mentioned in my previous post, I was unsure which version you wanted me to install. If you can clarify that, I can try it.
Thanks,
-Steve
01-23-2013 08:20 AM
Steve,
My apologies for the confusion. I meant to try the SP1 version of the C++ redistributable. I'll look forward to hearing how that goes.
06-15-2015 06:53 PM
Hi
Sorry to resurect this old problem but I am currently experiencing this issue deploying a project under the following environment:
Development: x64 C#, VS2012-AnyCPU, MS2013, Win8.1
Deployment: Win7, x64, no NI products
I have implemented most suggestions here including:
- install vs2010_redist_x86
- install vs2012 redist SP4 x64
- NI.Common in GAC (no other NI DLLs in GAC)
- All NI DLL's I can find in the exe flat file directory (spend to much time trying to finesse this!)
- Obviously NI.Common.Native is in the exe directory and at v13.0.40.188 (ref attach)
Application is a smiple scattergraph which stopped working on customer PC when I added a few waveformgraphs. No hardware is required.
Any suggestions would be appreciated.
Trace:
System.TypeInitializationException: The type initializer for 'NationalInstruments.UI.Internal.WaveformPlotElement' threw an exception. ---> System.BadImageFormatException: Could not load file or assembly 'NationalInstruments.Common.Native, Version=13.0.40.188, Culture=neutral, PublicKeyToken=dc6ad606294fc298' or one of its dependencies. An attempt was made to load a program with an incorrect format.
at NationalInstruments.PrecisionTimeSpan.FromSeconds(Double value)
at NationalInstruments.UI.Internal.WaveformPlotElement..cctor()
--- End of inner exception stack trace ---
at NationalInstruments.UI.Internal.WaveformPlotElement..ctor(ControlElement parent, Object obj)
at NationalInstruments.UI.WaveformPlot.CreateElement()
at NationalInstruments.UI.ControlEntity..ctor()
at NationalInstruments.UI.Plot..ctor()
at NationalInstruments.UI.XYPlot..ctor()
at MY.NS.RrfPlot.InitializeComponent()
at MY.NS.RrfPlot..ctor(DelStr putMsgDlg, Int32 formHome)
at MY.NS.RrfPlot..ctor(RrfRadarRawRecType[] radarData, DelStr putMsgDlg, Int32 formHome)
at MY.NS.RrfForm.PlotData_MouseUp(Object sender, MouseEventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
06-16-2015 05:57 AM
06-16-2015 06:32 PM
Hi Daniel
Thanks for helping.
Unfortunately, I can't follow the link you mentioned and searches have not revealed it, but I understand the application will be addressing the 32bit or 64bit assembly of the NI.Common.Native.dll.
I have tried to run the application with all versions of NI.Common.Native that I could find on my development system including from the build directory, GAC32, GAC64, DotNet.Assemblies.Current and DotNet.Assemblies (64bit).Current. All fail with the same error.
When I build the app as 32bit (rather than AnyCpu) it deploys and runs (success, I have a deliverable!). However, when I build 64bit no combination of NI.Common.Native works. I have also installed the 64bit version in the GAC and kept the 32bit version local incase of some interdependance; without success.
Finally, when I look at the headers of the two NI.Common.Native.dll's (using beyondcompare) I see one was built using i386 and the other AMD64, however, both files indicate they are for Windows 32bit (ref attach).
Clearly, I'm not understanding the 64bit deployment process but have followed the NI instruction closely. Any suggestions/links you can provide to help resolve this will be well recieved.
Cheers
Frank