Winforms C# app not running off development machine

I’ve followed all the instructions here on setting references to isolated and including all support files. However, I still get the following exception info when I run the program on a new machine…

Any suggestions? Using x86 debug version in this case…

Thanks for a super useful piece of software, and for your willingness to help!

Regards,

Scott

System.IO.FileNotFoundException
Message : The specified module could not be found. (Exception from HRESULT: 0x8007007E)
StackTrace : at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
at System.Windows.Forms.AxHost.CreateWithoutLicense(Guid clsid)
at System.Windows.Forms.AxHost.CreateWithLicense(String license, Guid clsid)
at System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid)
at System.Windows.Forms.AxHost.CreateInstance()
at System.Windows.Forms.AxHost.GetOcxCreate()
at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
at System.Windows.Forms.AxHost.CreateHandle()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.AxHost.EndInit()
at PlotFunction.FormCalc.InitializeComponent()
at PlotFunction.FormCalc…ctor()

Hello Scott.

If I’m reading this correctly, the load error is related to the PlotFunction library as opposed to the MapWindow.

But in similar circumstances, what I would suggest is running the Dependency Walker program (once part of the MS development tools and now an open source app) and pointing it at the PlotFunction DLL/OCX. It will attempt load dependencies and can in many cases determine which dll or component cannot be found.

I hope that helps.

Regards,
Jerry.

Jerry,

Thanks much – will give that a try tomorrow. The reason I’m leaning towards it being the .ocx is that the two places where I use functionality related to MapWinGIS (one for coordinate conversion, and another using the map control) both cause immediate crashes. All other functions of the program are working…

Thanks again, and I’ll let you know what I find out with Dependency Walker.

Regards,

Scott

Jerry,

Found the problem, and it’s .NET related. Haven’t found a solution yet on the affected machine, but it isn’t a problem with MapWinGIS. Also – I ended up using dependencies.exe (open source app) to solve the problem, since Dependency Walker consistently was hanging for me.

Thanks much, and feel free to close this thread.

Regards,

Scott

Actually, the .NET issue is sorted, but I was still having the same problem. I decided to try something, and installed MapWinGIS onto the target machine. That solved the problem.

Interestingly, even when I did a full uninstall of MapWinGIS and rebooted, my code continued working on that machine. It still fails on other target machines that have never had MapWinGIS installed on them.

Any thoughts as to what I’m missing? Would really prefer not to have to install MapWinGIS as a prerequisite for running my code…

Thanks much!

Scott

Hello Scott

If you have not yet resolved this, consider this post here. See if the MSVC Runtime might be the issue.

Regards,
Jerry.