MOGRE with VC# 2008


03-04-2008 19:24:38

I just got a new computer and I'm trying to set up Mogre. Microsoft apparently no longer offers VC# 2005 for download so I picked up VC# 2008 and installed the VC 2005 SP1 redistributable package and the DirectX runtime redist. However, any time I try to run a Mogre sample or one of the programs I have, I get this error:

System.BadImageFormatException: Could not load file or assembly 'Mogre, Version=, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format. File name: 'Mogre, Version=, Culture=neutral, PublicKeyToken=null' at Mogre.Demo.CelShading.Program.Main(String[] args)

Anyone know how I might be able to fix this?


03-04-2008 21:29:09

Try this:

If you're using 64bit Vista it might as well be this:


03-04-2008 22:34:51

I tried the DependencyWalker thing and it told me that I was missing msvcr90.dll. Is there some MS distributed package that will contain this dll?

EDIT: I found and added the dll but I still get the same error. Furthermore, when I try changing the target platform, I get this error:

System.IO.FileNotFoundException was unhandled
Message="The specified module could not be found. (Exception from HRESULT: 0x8007007E)"
at Mogre.Demo.CelShading.Program.Main(String[] args)
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()


04-04-2008 12:21:14

in my new pc i was getting an error like that... but i just change target platform to x86 and re-reference mogre dlls and works perfect..

Currently in my free time i am working in a game project using my Vista64 + VS2008 + Mogre1.4.6 and everything works nice.


04-11-2008 22:45:33

[deleted by user]