Awesonium Linux C# System.DllNotFoundException: Could not locate the path to the native Awesomium library

I am  running Ubuntu 16.04 and the Awesomium Web Browser C# Framework as well as Mono 4.4.2 with the environment variable MONO_PATH set to /usr/lib/mono/4.5 and the environment variable LD_LIBRARY_PATH set to /home/frankc/EnvironmentX64/Hybrid/Debug. 

In the directory folder /home/frankc/EnvironmentX64/Hybrid/Debug, I have copies of the dll assembly awesomium , libffmpegsumo.so , libawesomium-1-7.so.0.0 , awesomium_process , Awesomium.Mono.dll , Awesomium.Core.dll and Awesomium.Mono.dll.

When I compile the following C# test program , it compiles okay with no errors.

// Credit: Awesomium v1.7.2 C# Basic Sample //         by Perikles C. Stephanidis using System; using System.IO; using Awesomium.Core; using System.Threading; using System.Diagnostics; using System.Reflection;  namespace BasicSample {     class Program     {         static void Main( string[] args )         {             WebCore.Initialize(WebConfig.Default);              Uri url = new Uri("http://www.google.com");             Console.WriteLine("WE ARE HERE " + WebCore.PackagePath);               using ( WebSession session = WebCore.CreateWebSession(WebPreferences.Default) )             {                 // WebView implements IDisposable. Here we demonstrate                 // wrapping it in a using statement.                 using ( WebView view = WebCore.CreateWebView( 1100, 600, session ) )                 {                     bool finishedLoading = false;                     bool finishedResizing = false;                      Console.WriteLine( String.Format( "Loading: {0} ...", url ) );                      // Load a URL.                     view.Source = url;                      // This event is fired when a frame in the                     // page finished loading.                     view.LoadingFrameComplete += ( s, e ) =>                     {                         Console.WriteLine( String.Format( "Frame Loaded: {0}", e.FrameId ) );                          // The main frame usually finishes loading last for a given page load.                         if ( e.IsMainFrame )                             finishedLoading = true;                     };                      while ( !finishedLoading )                     {                         Thread.Sleep( 100 );                         // A Console application does not have a synchronization                         // context, thus auto-update won't be enabled on WebCore.                         // We need to manually call Update here.                         WebCore.Update();                     }                      // Print some more information.                     Console.WriteLine( String.Format( "Page Title: {0}", view.Title ) );                     Console.WriteLine( String.Format( "Loaded URL: {0}", view.Source ) );                 } // Destroy and dispose the view.            } // Release and dispose the session.                         // Shut down Awesomium before exiting.             WebCore.Shutdown();              Console.WriteLine("Press any key to exit...");             Console.Read();         }     } } 

Here is the compiler command :

mcs -r:./Awesomium.Mono.dll Test.cs

Yet when I run mono ./Test.exe , I observe the following run-time exception:

System.DllNotFoundException: Could not locate the path to the native Awesomium library.   at Awesomium.Core.WebCore.YFqkBlruD () <0x40641080 + 0x00853> in <filename unknown>:0    at Awesomium.Core.WebCore.EHyMTEo9AN () <0x4063cc30 + 0x00913> in <filename unknown>:0    at Awesomium.Core.WebCore.CreateWebView (Int32 width, Int32 height) <0x4063c9a0 + 0x00073> in <filename unknown>:0    at BasicSample.Program.Main (System.String[] args) <0x40620d70 + 0x000bb> in <filename unknown>:0  

Also, when I run mono ./Test.exe, I notice that the string WebCore.PackagePath is empty which is not what I expected since WebCore.PackagePath should point at the location for the dll assembly awesomium. Furthermore WebCore.PackagePath is a get property rather than a get and set property so I cannot change its value. Is there another similar property I could set to fix the System.DllNotFoundException: Could not locate the path to the native Awesomium library?

I have downloaded the GITHUB Awesomium WebBrowser C# source code and was unable to grep the string "Could not locate the path to the native Awesomium library".

strace mono ./Test.exe and export MONO_LOG_LEVEL=debug mono ./Test.exe revealed nothing immediately noticeable.

Could I find out the reason for the MonoSystem.DLLNotFoundException and how to fix it?

Today, I was able to compile, link and run the two Awesomium web browser C++ test programs and verify that they executed correctly.

Any help is greatly appreciated.

Replay

Category: ubuntu Time: 2016-07-28 Views: 3
Tags: ubuntu mono

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.195 (s). 12 q(s)