ฉันกำลังพยายามสร้างโครงการโดยใช้ Gtk#
ฉันเคยใช้ Gtk# มาก่อน และใช้ SharpDevelop ในการดำเนินการนี้มาโดยตลอด
ตอนนี้ ... ดูเหมือนว่าจะไม่ทำงานอีกต่อไป:
- ฉันได้ติดตั้งรุ่นล่าสุด Gtk# 2.12.26 สำหรับ .NET พร้อมด้วยแพ็คเกจตัวติดตั้งจาก เว็บไซต์ Mono อย่างที่ฉันเคยทำกับเวอร์ชันก่อนหน้านี้
- ฉันได้สร้างโครงการแอปพลิเคชันบรรทัดคำสั่ง C# ใน SharpDevelop โดยใช้ C# 3.0 และกำหนดเป้าหมาย .NET 3.5
- ฉันได้เพิ่มการอ้างอิง GAC จากโครงการของฉันเป็น atk-sharp, gdk-sharp, glib-sharp, gtk-sharp, Mono.Cairo และ pango-sharp
- ฉันได้เพิ่ม
using Gtk;
ลงในไฟล์ C# หลักของฉันแล้ว - เมื่อฉันเขียน
Gtk.
IntelliSense ของ SharpDevelop จะแสดงประเภททั้งหมดที่พบในเนมสเปซGtk
- เมื่อฉันคอมไพล์โปรเจ็กต์ คอมไพลเลอร์จะยกเลิกพร้อมกับข้อความต่อไปนี้:
ไม่พบประเภทหรือชื่อเนมสเปซ 'Gtk' (คุณขาดคำสั่งการใช้หรือการอ้างอิงแอสเซมบลีหรือไม่) (CS0246)
ฉันพลาดอะไรไป
สิ่งนี้จะเกิดขึ้นเมื่อฉันกำหนดเป้าหมายเป็น .NET 3.5 เท่านั้น เมื่อฉันกำหนดเป้าหมาย .NET 4.0 ฉันพบ ปัญหาที่แตกต่าง
ผลลัพธ์ที่สมบูรณ์ของคอมไพเลอร์ (ไม่ระบุชื่อเล็กน้อย) อ่านได้ดังนี้:
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)