I found a solution; i added environment variables for mono (eg MONO_HOME D:\Mono with Path D:\Mono\bin) and then it worked. None of the guides said to do this..
GTK# on Windows with Visual Studio 2010 - Can't build/debug (error)
-
06-10-2022 - |
Frage
I've scoured the net for a solution but there isn't one. I'm trying to make applications in Visual Studio 2010 C# Express with GTK#. The application is extremely basic but it can not run because of an error. The error centers around glibsharpglue-2.
Application
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Gtk;
namespace Ink
{
class MainUI
{
public static void Main()
{
Application.Init();
//Create the window
Window mainWindow = new Window("Ink by InkPuppet");
mainWindow.Resize(500, 600);
//Create a label and insert text
Label tempLabel = new Label();
tempLabel.Text = "Hello World!";
//Add label to form
mainWindow.Add(tempLabel);
mainWindow.ShowAll();
Application.Run();
}
}
}
Error
System.TypeInitializationException was unhandled
HResult=-2146233036
Message=The type initializer for 'Gtk.Application' threw an exception.
Source=gtk-sharp
TypeName=Gtk.Application
StackTrace:
at Gtk.Application.Init()
at Ink.MainUI.Main() in C:\Users\Jared\Documents\DevelopmentProjects\Ink\Ink\MainUI.cs:line 13
at System.AppDomain._nExecuteAssembly(RuntimeAssembly 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.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: System.DllNotFoundException
HResult=-2146233052
Message=Unable to load DLL 'glibsharpglue-2': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Source=glib-sharp
TypeName=""
StackTrace:
at GLib.Thread.glibsharp_g_thread_supported()
at GLib.Thread.get_Supported()
at Gtk.Application..cctor()
InnerException:
I am referencing: - atk-sharp - gdk-sharp - glib-sharp - gtk-sharp - pango-sharp - System - System.Net
Please advise me on how to fix this, I just want to get developing but this nonsense prevents any productivity.
Lösung
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow