C# ';没有可用的源';错误

C# ';没有可用的源';错误,c#,dll,C#,Dll,我把我的项目复制到一个dsik上,并试图在我母亲的家用电脑上运行它。 在我的代码中,我使用了HtmlAgilityPack.HtmlWeb,我有这一行: private List<string> test(string url, int levels,DoWorkEventArgs eve) { levels = 0; HtmlWeb hw = new HtmlWeb(); 我看到在D上的某个目录中缺少HtmlWeb.

我把我的项目复制到一个dsik上,并试图在我母亲的家用电脑上运行它。 在我的代码中,我使用了
HtmlAgilityPack.HtmlWeb
,我有这一行:

private List<string> test(string url, int levels,DoWorkEventArgs eve)
        {
            levels = 0;
            HtmlWeb hw = new HtmlWeb();
我看到在D上的某个目录中缺少HtmlWeb.cs:\

如果在我看到的捕获上设置断点,我的函数测试中也会有一个try-and-catch:

他被抓住了。 设备还没有准备好

我猜它可能在D中查找文件
HtmlWeb.cs
:\ 在我的母亲电脑中,D:\是我电脑中的DVD驱动器,它是硬盘

完全例外:

System.IO.IOException was caught
  Message=The device is not ready.

  Source=mscorlib
  StackTrace:
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
       at System.IO.StreamWriter.CreateFile(String path, Boolean append)
       at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize)
       at System.IO.StreamWriter..ctor(String path)
       at GatherLinks.Form1.removeDuplicates(List`1 a, List`1 b) in F:\GatherLinks\GatherLinks\Form1.cs:line 250
       at GatherLinks.Form1.test(String url, Int32 levels, DoWorkEventArgs eve) in F:\GatherLinks\GatherLinks\Form1.cs:line 111
  InnerException: 
在使用
HtmlAgilityPack.dll
im的参考区域中,我看不到我的代码有任何问题 它没有丢失

所以我想知道为什么它要在
D:\
上查找文件? 如果在我的电脑上,我确实重建/构建了解决方案并保存了它,我确信它会将所有文件和
dll的
添加到项目中,因此,如果我将它复制到我的磁盘上,并在我的母电脑上运行,它将工作


我做错了什么?我应该如何修复它呢?

我删除了HtmlAgilityPack.pdb,它工作得很好。删除文件,重新生成,关闭并重新打开,然后查看它是否工作

不是
GatherLinks.Form1.删除副本
您的代码?您不能跟踪/打印它用来打开
StreamWriter
的路径吗?
HTMLAgilityPack
是否存在于您开发它的机器的D:\驱动器上?Dave Zych是的,它存在于我开发应用程序的家中的机器的D:\驱动器上。它根本不存在于我母亲的电脑上。Alexi Levenkov我删除了streamwriter我不需要它,但它还没有解决问题。行上的断点仍然没有提供可用的源代码。
System.IO.IOException was caught
  Message=The device is not ready.

  Source=mscorlib
  StackTrace:
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
       at System.IO.StreamWriter.CreateFile(String path, Boolean append)
       at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize)
       at System.IO.StreamWriter..ctor(String path)
       at GatherLinks.Form1.removeDuplicates(List`1 a, List`1 b) in F:\GatherLinks\GatherLinks\Form1.cs:line 250
       at GatherLinks.Form1.test(String url, Int32 levels, DoWorkEventArgs eve) in F:\GatherLinks\GatherLinks\Form1.cs:line 111
  InnerException: