What is preventing my .NET 2.0 application from running on a 64-bit platform?
I have a .NET 2.0 application that won't run on a 64-bit OS (the customer tried both Server 2003 and Windows 7). The error message is:
The application failed to initialize properly (0xc0000135).
Googling this mess开发者_C百科age returns little helpful information (one link I found just said if you get this message it's because they don't support 64-bit).
I'd like to enable 64-bit support in my app. I don't have a 64-bit system to test with, and I don't want to make that investment without having some idea of what it will take to make this work.
Does anyone know what this error code really means? Are there any common pitfalls in 64-bit support that I should look out for?
The only hunch I have is the .NET TAPI wrapper (a now obsolete product called TransPort) might not work on a 64-bit system. (The vendor is long gone, and I have no source code).
The most likely cause of this problem is that your code is using a 32 bit specific native DLL either via COM interop, a mixed mode assembly (C++/CLI for example) or via PInvoke. Try setting your .Net application to be x86 architecture specific and see if it runs.
You can use the corflags tool to force the application to have 32 bit affinity
- http://msdn.microsoft.com/en-us/library/ms164699(VS.80).aspx
If, as JaredPar suggested, you are using Interop, Microsoft's FxCop will find any issues relating to 32/64 calls on the standard system DLLs (System32.dll and User32.dll)
精彩评论