Daniel Lip
Daniel Lip

Reputation: 11319

'No Source Available' Error

I copied my project to a dsik on key and tried to run it in my mother home pc. In my code im using HtmlAgilityPack.HtmlWeb and i have this line:

private List<string> test(string url, int levels,DoWorkEventArgs eve)
        {
            levels = 0;
            HtmlWeb hw = new HtmlWeb();

If i run my program it will not throw any exception but will continue just will not do anything. If i put a breakpoint on the line: HtmlWEb hw = new HtmlWeb(); Im moving to a No Source Available window:

Locating source for 'D:\Source\htmlagilitypack.new\Trunk\HtmlAgilityPack\HtmlWeb.cs'. Checksum: MD5 {58 c1 63 f6 cd 5 65 de 4c 3c d5 4b b1 b7 7 48}
The file 'D:\Source\htmlagilitypack.new\Trunk\HtmlAgilityPack\HtmlWeb.cs' does not exist.
Looking in script documents for 'D:\Source\htmlagilitypack.new\Trunk\HtmlAgilityPack\HtmlWeb.cs'...
Looking in the projects for 'D:\Source\htmlagilitypack.new\Trunk\HtmlAgilityPack\HtmlWeb.cs'.
The file was not found in a project.

I see that HtmlWeb.cs is missing in some directory on D:\

I have also a try and catch in my function test if i put a breakpoint on the catch i see:

IOexception was caught. The device is not ready.

My guess that its looking for a file maybe HtmlWeb.cs in D:\ And in my mother pc D:\ is a DVD drive in my pc its hard disk.

The full exception:

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: 

I dont see any problems in my code in the reference area with the HtmlAgilityPack.dllim Its not missing.

So i wonder why its looking for a file on D:\ ? If on my pc i did rebuild/build solution and saved it all i was sure its adding all the files and dll's it needs to the project so if i copy it to my disk on key and run it on my mother pc it will work.

So what did i do wrong here ? And how should i fix/repair it ?

Upvotes: 0

Views: 1286

Answers (1)

Sam
Sam

Reputation: 1376

I erased the HtmlAgilityPack.pdb and it worked just fine. Erase the file, rebuild, close and reopen and see if it works

Upvotes: 1

Related Questions