From: JohnS on
Hi there,

I have a fairly simple console app (.exe) in C# which runs fine in WinXP
(32 bits) but under Windows Server 2008 (64 bit) I get the following error
very early in the life of the app:

System.TypeLoadException: Method 'MyMethod' in type 'MyClass' from assembly
'MyApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have
an implementation.

Note that "MyClass" is a locally defined private class (in the ".exe") which
implements an interface defined in a C# DLL in the same folder as the
".exe". "MyMethod" is one of the interface methods and this returns an
interface from a C++/CLI DLL that's also located in the same folder. My
guess is that there's an issue with this return value. It should find it in
the C++/CLI DLL but I'm guessing it's not. Can anyone shed any light? Thank
you.

From: Arne Vajhøj on
On 16-02-2010 13:13, JohnS wrote:
> I have a fairly simple console app (.exe) in C# which runs fine in WinXP
> (32 bits) but under Windows Server 2008 (64 bit) I get the following
> error very early in the life of the app:
>
> System.TypeLoadException: Method 'MyMethod' in type 'MyClass' from
> assembly 'MyApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
> does not have an implementation.
>
> Note that "MyClass" is a locally defined private class (in the ".exe")
> which implements an interface defined in a C# DLL in the same folder as
> the ".exe". "MyMethod" is one of the interface methods and this returns
> an interface from a C++/CLI DLL that's also located in the same folder.
> My guess is that there's an issue with this return value. It should find
> it in the C++/CLI DLL but I'm guessing it's not. Can anyone shed any
> light? Thank you.

Difficult to say based on the available info.

Any chance that the C++ DLL really is a mixed mode DLL?

Arne
From: JohnS on
> Any chance that the C++ DLL really is a mixed mode DLL?

No. It's 32 bit running under WOW64. I'm not usually one to blame MSFT since
programmers are usually at fault (whenever they do blame MSFT), but it
wouldn't surprise me if this were a bug (it runs under XP ok and I see no
immediate reason why the problem should exist on a 64 bit machine). Anyway,
thanks for the feedback.

 | 
Pages: 1
Prev: Populating DataKeyNames
Next: GDI DrawLine