Errors with New Mogre

CK_MACK

23-01-2007 21:08:04

Getting a compile error after installing the new Mogre 0.1.9.

Could not load file or assembly 'Mogre, Version=0.1.9.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1)


I went back to tutorial 0 and tried to follow the directions.

I replaced the .cfg in debug and release, checked the system path variable, and removed the old Mogre resource and re-added mogre.dll (i use debug right now)

Any suggestions?

smernesto

23-01-2007 21:28:00

You have to replace all .dll files, including the ogre .dll files.

I replaced all .dll files in the bin directory of my project with the new ones, remove the mogre reference and add it again with the new mogre and it works fine.

Ernesto Gutierrez

CK_MACK

23-01-2007 23:49:04

Ok well, I tried many different things.
But I must be missing something important.

Here's what I have done:
1. Renamed old SDK, and installed new.
2. confirmed my path variable has ;C:\OgreSDK\bin\release;C:\OgreSDK\bin\debug"

3. "Add Reference". Click on the "Browse" tab, and change the directory to "C:\OgreSDK\bin\release". Select both Mogre.dll and MogreFramework.dll and click "OK".

4. copy all files in C:\OgreSDK\bin\release directory with the ".cfg" extention into my project's bin\debug directory

5. Edited the resources.cfg and Replaced all occurances of "../../" in the document with "C:/OgreSDK/".

6. Removed my reference for Mogre.dll and re-added the new Mogre.dll from C:\OgreSDK\bin\debug"

still getting the same error.

I was not able to find an Ogre.dll that you mentioned... what am I supposed to do with it?

I am able to revert back to the old sdk, and get it working. So, that would indicate that program I am trying to compile is ok.

Bekas

24-01-2007 00:06:10

Did you recompile MogreFramework ?
And do the Mogre demos run ok ?

CK_MACK

24-01-2007 01:28:27

I did not re-compile MogreFramework, I used the precompiled DLL from the tutorial. Do I need to recompile MogreFramework as well?
If so, then that would render the tutorials unusable until a new DLL is available or recompiled. OK so, I need to recompile the MogreFramework?

EDIT, I tried to compile it but I guess I need to find a "complete" source code because the one I looked at seemed to be organized in directories on a website. And I am not piecing it together properly.

_______________________________________________________

I have never been able to get the Mogre Samples to work (even with the old version of mogre).

When I click on the "Mogre Samples.sln" in the "C:\OgreSDK\Mogre Samples" directory (during the load) I get an error:

The application for project 'C:\OgreSDK\Mogre Samples\VB.NET SkeletalAnimation\VBDemo.SkeletalAnimation.vbproj' is not installed. Make sure the application for the project type(.vbproj) is installed.

I am not sure why there is a VBProj in the Mogre Samples.sln... but when I try to Build the entire solution, I get an error:

A project with an Output Type of Class Library cannot be started directly. In order to debug this project, add an executable project to this solution which references the library project. Set the executable project as the startup project.

I guess I am used to seeing program with a .sln compile and run.
I don't understand what it is missing.

Marc.

Bekas

24-01-2007 01:48:52

Do I need to recompile MogreFramework as well?
Nope, false alarm, I tested it and it works fine.

I have never been able to get the Mogre Samples to work (even with the old version of mogre).
I assume you have Visual C# express, right ? I don't have one to test on, but I think you can open up the project file (i.e. "C:\OgreSDK\Mogre Samples\SkeletalAnimation\Demo.SkeletaAnimation.csproj") directly and build from there.

smernesto

24-01-2007 02:41:28

No Ogre.dll, The ogre .dll files (OgreMain.dll and those files) sorry with the confusion.

For your problem with
A project with an Output Type of Class Library cannot be started directly. In order to debug this project, add an executable project to this solution which references the library project. Set the executable project as the startup project.

... you have to select the project that you want to run in the Solution Explorer, and right click the project and choose the option that makes the project the begin project (sorry my Visual Studio is in spanish). For default the solution takes Demo.ExampleFramework as the begin project and it is an .dll file that can´t run it alone then if you choose another project in the solution as begin project it will run, but maybe you need also change the build path to the Release folder of Mogre or copy the .dlls to the bin/debug folder of each demo well you can copy the .exe to the release forlder of Mogre because the demos reference the Mogre Release.

If you use Visual C# only, then remove the Visual Basic Skeleton demo from the solution and compile again. I have Visual Studio 2005 (I won a copy in a exam with microsoft :) ) and I don´t have problems compiling the demos for the 0.1.9 and 0.1.8.


you say

4. copy all files in C:\OgreSDK\bin\release directory with the ".cfg" extention into my project's bin\debug directory
...
6. Removed my reference for Mogre.dll and re-added the new Mogre.dll from C:\OgreSDK\bin\debug"


You have to reference to mogre debug and use the debug files mogre or reference mogre release and use release file of mogre.

Are you referencing the release .dll files of mogre and copying the debug files?
Becuase if you do it it will throw and expection when you load your .exe.

Check again if you use and reference release only or debug only files of Mogre.

CK_MACK

24-01-2007 05:16:59

I am using C# 2005 Express. I have tried to make sure that the release version of Mogre.dll is used in the release version of BIN/Release
and the Debug version of Mogre.dll is in the BIN/debug of the project.
But since I don't use the release (I use debug) I don't know that the release is needed.
_________________________________________

Currently my Build order for the Mogre Samples is:
Demo.ExampleApplication
Demo.Gui
Demo.SkeletaAnimation (thats the actual spelling)
Demo.MogreForm
Demo.Fresnel
Demo.Dot3Bump
Demo.CelShading

What order is the correct one?

From what I have gathered from the explanations...
In order for me to Compile these samples I need to have a program that compiles with them? and launches them?

But which one is the launcher?

_____________________________________________________
Bekas,
I tried loading from Demo.SkeletaAnimation.csproj and then building... but when I run the .exe I get An exception 'System.IO.FileLoadException' has occurred in Mogre.Demo.SkeletalAnimation.exe

smernesto

24-01-2007 06:25:38

I follow this steps and all works fine. Don´t worry about the order of compile the demos. the only dependency is ExampleFramework, Visual Studio knows that it have to compile it first.

0. Uninstall Previous OgreSDK folder. If the folder is not removed then I deleted the folder.
1. Install Mogre 0.1.9 in C:\OgreSDK
2. I checked the C:\OgreSDK/bin/debug and C:\OgreSDK/bin/relase folder of OgreSDK and it doesn´t contains the .exe files of the demos and the .dll file of the exampleframework
3. Open Mogre Samples.sln in Visual Studio 2005 it shows me many projects in the solution explorer.
4. I pressed F6, the command is Generate->Generate Solution. I don´t run the demos yet. It compiles OK.
5.I opened the c:\OgreSDK/bin/Debug folder and it contains 7 .exe demos and a Mogre.Demo.ExampleApplication.dll file. The files were generated by Visual Studio 2005 Just pressing F6. I checked the C:\OgreSDK/bin/release folder and it doesn´t contains demos.
6.Double Clicked in the .exe file and tested each of the demos generated and all works OK. No exceptions.
7. Just to test, I copy all the 7 .exe files of the demos and the Mogre.Demo.ExampleApplication.dll file form the C:\OgreSDK/bin/debug folder to the C:\OgreSDK/bin/release forlder and.... it works fine. hehe :roll:

Well please follow this steps and tell us what happen. If this steps don´t work for you then we can explore another solution. If you have problem with the Visual Basic Demo then remove it at the step 3.

Bekas

24-01-2007 09:05:18

@CK_MACK: See this post

CK_MACK

24-01-2007 19:13:47

Thank you Bekas,

Patching to the latest SP1 solved the problem I was having with the new Mogre.

I obtained the patch for C#:
http://download.microsoft.com/download/7/7/3/7737290f-98e8-45bf-9075-85cc6ae34bf1/VS80sp1-KB926749-X86-INTL.exe

Amazing how fast it worked once I put the patch in! :lol:

_______________________________________________
Smernesto, thanks for help, now that new Mogre is working, I was able to work on getting those examples to compile!

Your advice worked!
When using the .exe files from C:\OgreSDK\bin\release all worked well.


So, I think what I was doing wrong was trying to run the .exe from C:\OgreSDK\Mogre Samples\SkeletalAnimation\bin\Release, instead of C:\OgreSDK\bin\release.

Thanks again!

Marc

smernesto

24-01-2007 19:22:33

BINGO!!!

hehehe, wow, I thinked we never will find the error.

Bekas won the prize hehe.

marc_antoine

24-01-2007 22:10:49

yeah BEKAS don't go to the military...pls!?..... we need you :D :? :roll: