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?
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.
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.
Make sure copy to local is on in the properties of the reference
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...
yes you can't add ogremain you just need it copying on deployment.
See this question it should help http://stackoverflow.com/questions/5289
... -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)
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.