Hello.
I need to embed torrent client (ability to download files by .torrent file) inside of my C# application. I am using monotorrent library to do that.
I need to write windows app that can download files to my local folder by .torrent file.
I have downloaded assembly for C# project from here
http://www.monotorrent.com/projects/list_files/monotorrent
Here is code i am using :
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using MonoTorrent.Client;
using MonoTorrent.Client.Encryption;
using System.IO;
using MonoTorrent.Common;
using System.Net;
namespace monotorrent
{
public partial class Form1 : Form
{
ClientEngine engine;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Torrent torrent = Torrent.Load("C:\\1.torrent");
TorrentManager manager = new TorrentManager(torrent, "E:\\torrent", new TorrentSettings());
this.engine.Register(manager);
manager.Start();
}
}
}
When i run the code and press download button i have got an error :
Cannot load type "MonoTorrent.Common.Torrent" from assembly "monotorrent, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null".
I think this is a problem with assembly . But where can i get a normal assembly(.dll) ?
Please help me to resolve this issue.
P.S. if you know more simple solution to embed torrent client to windows form app - You are wellcome =)