Trying to compile VS2008 project on Win 64 bit which is custom Powershell PSSnapin

Posted by Boris Kleynbok on Stack Overflow See other posts from Stack Overflow or by Boris Kleynbok
Published on 2010-06-12T02:33:14Z Indexed on 2010/06/12 2:42 UTC
Read the original article Hit count: 422

Library Project compiles fine for ANY CPU in VS2008 running on Win 7 64 -bit.

Now in the post build following command fails when attemptiong to register library dll:

PS C:\Windows\Microsoft.NET\Framework64\v2.0.50727> .\installutil C:\path\Project.dll

Exception occurred while initializing the installation:

System.BadImageFormatException: Could not load file or assembly 'file:///C:\path\Project.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format..

Do I need to compile the project as x64 I was under impression that AnyCPU will take care of it.

Alo my library does have dependencies. Do they also need to be compiled as x64 bit?

Any help is appreciated.

© Stack Overflow or respective owner

Related posts about Windows

Related posts about visual-studio-2008