I have an application written in IronPython that I want to distribute as an .exe on other PCs. I've been using pyc.py following the instructions here, and been somewhat successful. I end up with a dir containing:
- my_app.exe
- my_app.dll
- StdLib.DLL [this contains the standard IronPython library, as suggested in the SO post referenced above]
- IronPython.dll
- IronPython.Modules.dll
- Microsoft.Dynamic.dll
- Microsoft.Scripting.dll
- Microsoft.Scripting.Metadata.dll
I'm using IronPython 2.7.3; on my dev machine I have .NET 4.0.30319.17929.
The problem I have is that when I distribute the above to other machines, on some machines it works perfectly, and on others I get the following:
Unhandled Exception: System.MissingMethodException: Method not found: 'Int32 Iro
nPython.Runtime.Operations.PythonOps.InitializeModuleEx(System.Reflection.Assemb
ly, System.String, System.String[], Boolean)'.
at PythonMain.Main()
The machines it works on include both Windows 7 and Windows XP boxes, and the machines it fails on also include both Windows 7 and Windows XP. I've checked the .NET versions, comparing the machines where it works and where it doesn't work and I can't see anything obvious. For example, on an XP machine where it fails I have a .NET profile of:
<32Bit>
1.1.4322.2494
->C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322
2.0.50727.3634
->C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
4.0.30319.269
->C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319
< Installed .NET Frameworks >
.NET FW 1.1 SP 1
.NET FW 2.0 SP 2
.NET FW 3.0 SP 2
.NET FW 3.5 SP 1
.NET FW 4.0 Client
.NET FW 4.0 Full
and on an XP machine where it works fine I have a .NET profile of:
<32Bit>
1.1.4322.2494
->C:\Windows\Microsoft.NET\Framework\v1.1.4322
2.0.50727.3634
->C:\Windows\Microsoft.NET\Framework\v2.0.50727
4.0.30319.269
->C:\Windows\Microsoft.NET\Framework\v4.0.30319
< Installed .NET Frameworks >
.NET FW 1.1 SP 1
.NET FW 2.0 SP 2
.NET FW 3.0 SP 2
.NET FW 3.5 SP 1
.NET FW 4.0 Client
.NET FW 4.0 Full
which looks identical to me.
I don't really know what to look at next; any clues?