2

I have two computers that are both W7-64. I am attempting to prepare the second computer (PC) to execute an IronPython automation suite that was built on the first computer (Master).

Currently, PC is failing when scripts reach the following line:

clr.AddReferenceToFileAndPath(Path.GetFullPath(r"C:\analyst_test\bin\Debug\Win32API.dll"))

Output:

SystemError:  The module was expected to contain an assembly manifest.(Exception from HRESULT: 0x80131018)

None of the files have changed, and the dll has not been changed in any way. Does Master require a manifest? Is Master finding a Manifest elsewhere? How can I resolve or work around this issue?

  • 1
    Do both machines have the same .NET version? Have you had a look at questions like [this one](http://stackoverflow.com/q/12135925/468244) assuming that it might just be .NET and not IronPython-related? – Simon Opelt Mar 25 '15 at 07:15
  • That error is generated if the CLR doesn't recognize the DLL as a .NET assembly. The "manifest" is what makes a .NET dll different from any other dll on your machine. A name like "Win32API.dll" does not especially yell .NET, given that Win32 is a native code api. Or the project that contains this code targets the wrong version of .NET, a v4.0 assembly cannot be recognized by the v2.0 version of the CLR. – Hans Passant Mar 26 '15 at 14:40
  • This machine was missing a .NET redist. Thanks, everyone. – ShortCipher Mar 26 '15 at 18:13

1 Answers1

1

As Simon said, check that both machines have the same .NET version. Also, another common culprit is the VC++ redistributable version. If you set up fuslogvw it should give you more information.

Jeff Hardy
  • 7,632
  • 24
  • 24