MonoGame not working - c#

I am just getting started with MonoGame (and game programming in general) and cant run any programs. I keep getting this exception message
An unhandled exception of type 'System.DllNotFoundException' occurred in MonoGame.Framework.dll
Additional information: Unable to load DLL 'openal32.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Does anybody know how I can fix this?

You'll need to install OpenAL.
This is included in the standard MonoGame installer, and placed in "C:\Program Files (x86)\MonoGame\v3.0\oalinst.exe".

Yes, you need to install OpenAL. If you're bulding windows game project it will be wise to add OpenAL DLL file links into your project and mark them to be copied to Output directory. This way your deployed game will not require separate OpenAL installation on client (or even on another dev machine).
Dll files are:
OpenAL32.dll
wrap_oal.dll

I had the same error, when you have win10 it includes directX, so if you are using win 8 or less you need to install direct10: the link: https://www.microsoft.com/en-us/download/details.aspx?id=35&nowin10
and.... finally works!!!

Related

Running CodedUI Test From Another Application

I'm planning to run my coded UI test from another project (in same solution). I added a reference of the CUIT project to my winform app project. Also I added these references as well
Microsoft.VisualStudio.TestTools.UITesting.dll
Microsoft.VisualStudio.QualityTools.CodedUITestFramework.dll
Microsoft.VisualStudio.TestTools.UITest.CodeGeneration.dll
Microsoft.VisualStudio.TestTools.UITest.Framework.dll
Microsoft.VisualStudio.TestTools.UITest.Playback.dll
My code is something like this
Playback.Initialize();
TestProject.CodedUITest1 coded = new TestProject.CodedUITest1();
coded.CodedUITestMethod1();
Playback.Cleanup();
However, I get an exception on the Playback.Initialize() call.
this is the message...
"An unhandled exception of type 'Microsoft.VisualStudio.TestTools.UITest.Extension.PlaybackFailureException' occurred in Microsoft.VisualStudio.TestTools.UITesting.dll"
Someone said that installing Test agent 2010/Test agent10 can solve this error.
I installed MS Visual studio Test Agent 2010, but same error happens.
What am I doing wrong here?
Thanks
I tried to run the test the same way you do and it worked for me.
Below are the reference dlls I have added in my projects
Please make sure you have added all the dlls. In case you are not able to find the dlls, look for them in C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies.
If this doesn't work please provide the details of inner exception.
I found an answer to my problem. I found that the message of the inner exception is
"Retrieving the COM class factory for component with CLSID {27876903-E697-4406-BF49-1B8B92CB8735} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))."
After digging around I found that I have a 32 bit third party dll which I'm running on my 64-bit machine. The conflict is 64 bit process trying to invoke 32 bit process in 64 bit machine.
The solution is to change the project properties to target to 'X86' machine instead of 'Any'.

WebKit.NET with C# Project Runtime Exception

I have downloaded WebKit.NET 0.5-bin-cairo to work with an existing C# Project. I've included WebKitBrowser.dll and WebKit.Interop.dll as a reference to the module that requires it, as well as playing them directly in the debug/bin folder as directly by this tutorial.
I do not get any errors until I run the project and get an exception on this line in InitializeComponent() of the designer class.
this.webKitBrowser1 = new WebKit.WebKitBrowser();
The exception:
An unhandled exception of type 'System.ComponentModel.Win32Exception' occurred in WebKitBrowser.dll
Additional information: Failed to initialize activation context
I am building all the modules as 86x debug and my computer is 64 bit.
Any suggestions are appreciated as I've been playing around with this for multiple days.
I had encountered same issue. Three things were missing in my scenario.
manifest files: must be placed as all dlls are dynamically linked
VC++ must be installed on machine: In my case I used vc++2005 redistributable sp1.
Not only dlls/pdb/manifest you need to copy all the folders to root directory of executable
There is no correct packaging available yet for all files/folders of webkit.NET
And obviously project architecture should be x86 for all projects referencing webkit dlls
Have you tried:
WebKit.Net and OpenWebKitSharp Error: Failed to initialize activation context ? Namely to copy all the files from Core(not just the dlls) into your project /bin/release/ or /bin/debug/ folder?
quoted from the tutorial you followed:
Before we can run the application, WebKit.dll and it's dependencies must be present in the output directory. In Windows Explorer (or otherwise), copy all of the files from the WebKit .NET 'bin' directory to your project's output directory. For example, here is the listing of my output directory after copying:
D:\webkitdotnet\WebKitTest\WebKitTest\bin\Debug>ls
CFLite.dll icudt40.dll
JavaScriptCore.dll icuin40.dll
JavaScriptCore.resources icuuc40.dll
SQLite3.dll libcurl.dll
WebKit.Interop.dll libcurl.dll.manifest
WebKit.dll libeay32.dll
WebKit.resources libeay32.dll.manifest
WebKitBrowser.dll libpng13.dll
WebKitBrowser.dll.manifest libxml2.dll
WebKitBrowser.pdb libxslt.dll
WebKitTest.exe pthreadVC2.dll
WebKitTest.pdb ssleay32.dll
WebKitTest.vshost.exe ssleay32.dll.manifest
WebKitTest.vshost.exe.manifest zlib1.dll
curl.exe.manifest
You mentioned you only copied WebKitBrowser.dll and WebKit.Interop.dll over

FileNotFoundException when loading dll

When I try to execute my program I receive FileNotFoundException, howerver dll exist in the same folder. How is that possible and how to fix the problem? Output below translated from localized messages of Russian Windows Server 2008 R2 Foundation:
C:\Oleg\bin\fast>FAST.exe
Exception: System.IO.FileNotFoundException: Can't load "QuickFASTDotNet.dll"
or dependent component. Can't find this file.
in FAST.FAST..ctor()
in FAST.Program.Main(String[] args) in C:\Oleg\fast\FAST\FAST\
Program.cs:line 474
C:\Oleg\bin\fast>dir QuickFASTDotNet.dll
16.02.2012 16:45 117 760 QuickFASTDotNet.dll
The same binaries work on my Windows 7 machine (but doesn't work on another Windows Server 2008 R2 Foundation machine).
Please check out Debugging Assembly Loading Failures.
Most likely reason is some related file is not installed in the GAC on you Server machines, or x86/x64 mismatch.
Perhaps, QuickFASTDotNet.dll call some function of another library and these library not found. You can use dllexp to check it.
I was getting same error when the file has been blocked by Windows since it's been copied from another computer. Right click on the dll file and click on "Unblock" button from the security tab
See https://superuser.com/questions/38476/this-file-came-from-another-computer-how-can-i-unblock-all-the-files-in-a

BCL.XPRB dll isn't initializing in C#.Net application

I am trying to resolve an initialization error for the optimizer library. I have a license for and installed Xpress-IVE 64bit studio, however, I need to link and use xprb facilities in a C#.Net application that is built in VS2010 and runs on IIS.
I copied xprb.dll and xprbdn.dll to application bin folder for deployment, and added them as references. Yet when the application calls XPRB.init(), it throws exception
Unable to load DLL 'xprb.dll': The specified module could not be found.
(Exception from HRESULT: 0x8007007E)
Any suggestions on what could be missing?
It turned out to be a Windows/.Net/general instability issue. The license, although installed, wasn't found by .Net, which decided to blow up as if the dll wasn't available. Finally was resolved mysteriously after a few system reboots and updates.
I had the same issue, but running windows 8.1, xpress-ive 64bit and vs2013 with c#. I could run IVE and solve problems from there, but i got "An unhandled exception of type 'Additional information: Unable to load DLL 'xprb.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)" error in runtime when running using bcl in VS. What solved the problem in my case was going through the necessary environment variables and directing them to the correct xpress folders (environment variables xpress, path and mosel.dso).

GTK# + WebKit + Windows

I have developed a GTK# application that makes use of webkit-sharp to edit email templates. This application works in Linux but when it is run in Windows it does not work. I am using the webkit-sharp.dll from Linux in Windows. The error that I am getting is:
System.TypeInitializationException: The type initializer for 'WebKit.WebView' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'webkit-1.0': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at WebKit.Download.webkit_download_get_type()
at GtkSharp.WebkitSharp.ObjectManager.Initialize()
at WebKit.WebView..cctor()
--- End of inner exception stack trace ---
at WebKit.WebView..ctor()
at MainWindow..ctor()
I am guessing that webkit-sharp.dll only wraps the native libraries for WebKit. I do not know where to get "webkit-1.0". Is there a webkit-sharp.dll that is specific to Windows for GTK#?
I did exactly that. I guess the webkit windows dll does not use gtk as rendering engine.
What I did was install the libwebkit dll provided by the suse mingw32 port and all of its dependencies.
You can see a full list of dependencies here
At the time of doing it(1 year ago more or less) the rendering was not perfect, but it may have improved.
I'm also having this problem...
Not tried this, but at http://www.webkit.org/building/checkout.html
The site suggests:
Download webkit support libraries
Run the update-webkit script
Build webkit from source
I think this requires cygwin installed.
I'm just paraphrasing the site - not tried this yet.
Have you tried running the Hello World example app to make sure everything is set up correctly in your Windows environment?
http://mono-project.com/Mono_Basics
You can also try some of the other example programs to make sure they function without error.
http://www.mono-project.com/GtkSharpBeginnersGuide
Seems like a common installation issue requires the addition of an environment variable in windows to get the assemblies loaded correctly:
http://www.mono-project.com/FAQ:_General#Installation_Problems

Categories