2016-08-20 56 views
1

這是我第一次在C#中使用Visual Studio或async。我正在使用Visual Studio 2015和這個附加參考(任何CPU):https://github.com/kade-robertson/AnimmexAPI/releases/tag/0.0.3無法加載文件或程序集或其依賴項之一

我試圖測試在Windows窗體應用程序這個API,但每當我運行它,我得到以下信息:

類型「System.IO.FileNotFoundException」的發生未處理的異常的系統。 Windows.Forms.dll

其他信息:無法加載文件或程序集'AnimmexAPI,Version = 0.0.3.0,Culture = neutral,PublicKeyToken = null'或其依賴項之一。該系統找不到指定的文件。

這裏是我試圖運行的代碼:

using System; 
using System.Collections.Generic; 
using System.ComponentModel; 
using System.Data; 
using System.Drawing; 
using System.Linq; 
using System.Text; 
using System.Threading.Tasks; 
using System.Windows.Forms; 
using AnimmexAPI; 

namespace AnimmexDownloader 
{ 
    public partial class Form1 : Form 
    { 
     public Form1() 
     { 
      InitializeComponent(); 
     } 

     private async void button1_Click(object sender, EventArgs e) 
     { 
      var api = new AnimmexClient(); 
      var fellowshipVid = await api.ImFeelingLucky("fellowship of the ring"); 
      MessageBox.Show(fellowshipVid.ToString()); 
     } 
    } 
} 
+0

嘿! AnimmexAPI的創建者:)我的建議是使用NuGet上現有的包,它也會處理依賴關係! – Kade

回答

相關問題