Error while running demos with debug

terrachild

25-09-2007 13:01:12

Okay, I'm stumped.

I've set everything up per the instructions using C# 2005 Express.

Yes I've updated everthing!

I can run the demos. I can build the demos and run them from the OgreSDK bin debug folder, but when I try to debug them, specifically Demo.CameraTrack everything loads up in the console and then an exception is thrown at the line in Example.cs that says:
CreateInput();

I coppied the error:
System.IO.FileNotFoundException was unhandled
Message="The specified module could not be found. (Exception from HRESULT: 0x8007007E)"
Source="Mogre.Demo.ExampleApplication"
StackTrace:
at Mogre.Demo.ExampleApplication.Example.CreateInput()
at Mogre.Demo.ExampleApplication.Example.Setup() in C:\OgreSDK\Mogre-Samples\ExampleApplication\Example.cs:line 89
at Mogre.Demo.ExampleApplication.Example.Go() in C:\OgreSDK\Mogre-Samples\ExampleApplication\Example.cs:line 51
at Mogre.Demo.CameraTrack.Program.Main(String[] args) in C:\OgreSDK\Mogre-Samples\CameraTrack\Main.cs:line 14
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()



Just to prove that everything else is working I commented out
//CreateInput();

and the line above it:
//CreateFrameListener();


Now it runs, but there is no camera movement. Everything looks fine.


What the heck is going on???

Thanks.

GrAnt

01-05-2011 08:06:01

@#$%!!! the SAME problem! I use VC#2010 + MOGRE 1.7.1.b72. Trying to use, to be sharp. CreateInput doesn't work so the whole solution is completely useless. MOIS library is built with .NET 2 only. Perhaps this is the problem? I didn't find any explaination yet

Lologarithm

12-05-2011 18:34:18

I also had the same trouble. I was able to successfully build the Mogre.Demo.ExampleApplication.dll and have referenced it in some of the demo projects. However when trying to actually execute the demo it would tell me:
Could not load file or assembly 'Mogre.Demo.ExampleApplication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.

This means that you are trying to use an x64 dll in an x86 application. Simply go into your configuration manager in VS, change all your output types to x86 in both ExampleApplication and the demo file and it should work just fine

Edit:
It also looks like there is a "BuildSamplesX86.cmd" in the MogreSDK directory. Run that and they should all be built for x86 which will make the Sample Browser work just fine :)