Deploy Mogre project


27-06-2013 17:19:15

Hi everyone, I have a problem with deploy my Mogre project. I am using VS2012 and when I try to use VS "Publish project" I get error

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assemly 'Mogre.dll' or some of its dependencies.

Do you know how to fix it?


28-06-2013 06:40:02


have you checked that all required DLL files in the same folder as your exe? There should be a Mogre.dll, OgreMain.dll and some other Ogre*.dll, Plugin_*.dll and RenderSystem_*.dll files.


28-06-2013 09:26:48

My release app works fine. It has all libs, but when I try to create instalator/deploy/publish so the VS creates the files as mogre.dll.deploy and no others libs.


28-06-2013 10:05:59

Make sure copy to local is on in the properties of the reference


28-06-2013 11:24:50

Maybe it will be the problem. In project I have just Mogre and MOIS references bu when I try to add OgreMain.dll so I have exception...


28-06-2013 13:39:50

yes you can't add ogremain you just need it copying on deployment.

See this question it should help ... -in-vs2010 (if you are using 2008 or 2012 this should still apply)

or you can use post build commands and just have a source folder that is copied after build to the output directory. (this is how I usually do it)


29-07-2013 11:48:04

You can add all needed files (*.dll, *.cfg) to your Visual Studio project.
Don't just add the files, add them as reference (use the tiny drop down symbol of the add button).
Then all files will copied to the output directory at compile time. I suppose deploying works, too.

Don't forget that you need to ship vcredist (Visual C++ Redistributable) for ALL VC versions that were used to compile each dll file. Also the SP version of VS you have to recognise. ( If compiled with VS 2008 SP1, you need vcredist version of VS 2008 SP1, not just VS 2008).
Also let the user know, that he has to run the DirectX web installer to get the latest version. Also he should use the latest driver of the graphic card.

Test your installer on an other computer, which hasn't Visual Studio. In best case a fresh installed Windows.