我正在尝试使用Gtk#构建项目。
之前我使用过Gtk#,我一直在使用SharpDevelop这样做。
现在......它似乎不再起作用了:
using Gtk;
添加到我的主C#文件中。Gtk.
时,SharpDevelop的IntelliSense将显示Gtk
命名空间中找到的所有类型。找不到类型或命名空间名称'Gtk'(您是否缺少using指令或程序集引用?)(CS0246)
我缺少什么?
只有在我定位.NET 3.5时才会发生这种情况。当我以.NET 4.0为目标时,我遇到了different problem。
编译器的完整输出(稍微匿名化)如下所示:
Build started.
Warning MSB3245: Could not resolve this reference. Could not locate the assembly "Mono.Cairo". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
Warning MSB3245: Could not resolve this reference. Could not locate the assembly "pango-sharp". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
Warning MSB3245: Could not resolve this reference. Could not locate the assembly "gtk-sharp". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
Warning MSB3245: Could not resolve this reference. Could not locate the assembly "gdk-sharp". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
Warning MSB3245: Could not resolve this reference. Could not locate the assembly "glib-sharp". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
Warning MSB3245: Could not resolve this reference. Could not locate the assembly "atk-sharp". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
Compiling ...
...\Program.cs(3,7) : Error CS0246: The type or namespace name 'Gtk' could not be found (are you missing a using directive or an assembly reference?)
Build failed. (00:00:00.1930110)