"File not found" in Results on first run of a script
I am not 100% sure as to when this starts to happen to me, but I believe it may be temporary file related, as I usually notice it start to happen after I have CCleaner delete temporary files (but not always, I've found). It doesn't happen if I close LINQPad and then start it up again. I was having this problem with LINQPad 6 and still have it with LINQPad 7 as well.
What happens is that if I load up an existing script or create a new one, then go to run the script, if it has output in Results, I'll see a File not found
page come up with ERR_FILE_NOT_FOUND
as the error at the bottom. I also get a LINQPad error dialog box that has the exception of System.InvalidOperationException
and when I click on the details, it says Unable to access HTML DOM [1,false].
. However, once I run the same script again, the output shows up in Results just fine. I have submitted the error via the error dialog box but I wanted to bring it up here as well just in case.
Comments
I'm getting the same error. Did you ever figure this out?
The latest version of LINQPad (7.2.7) keeps a lock on the file in question, so it shouldn't be possible to delete it while LINQPad is running. 7.2.7 is now RTM and will auto-update within a week. You can update right away via Help | Check for Updates.
I am running 7.2.7 and everything I try, even a "Hello, World!" C# program fails with some type of exception. Sometimes, it is System.IOFileNotFoundException (details: "The system cannot find the file specified. (0x80070002) and sometimes it is System.InvalidOperationException (details: "CoreWebView2 unavailable").
LINQPad 6.15.12 doesn't have this problem and neither did all previous versions (going back to 2 or 3...).
I have to use version 6 until I can figure this out.
Thanks!
Update: I just saw https://forum.linqpad.net/discussion/2655/corewebview2-unavailable-error.
In my case, rebooting the PC doesn't help, as I rebooted, shutdown, and powered off my laptop multiple times since.
I am running in a virtual machine and I have admin rights. Does it make any difference?
SOLVED:
Sometimes, all it takes is to ask for help for our brain to start working.
I did the following:
1. In the menu: Query > NuGet Package Manager (Crtl+Shift+P)
2. Top middle text box (Search online): WebView2
3. Click on Add to Query next to "Microsoft.Web.WebView2"
4. Click on Close (bottom left)
And it all started working!
I was getting a CoreWebView2 members cannot be accessed after the WebView2 control is disposed.
Once rebooting solved it. I just started this machine up.
I added the NuGet. The CoveWebView2 error went away. Now I get this:
System.InvalidOperationException
LinqPad is my goto c# scripter! What can I do?
Tried the beta version. No error. But no results show at all.
LinqPad 6 works. I will just use that for now until this can get resolved.
Are you able reproduce this condition on another machine? Also, there's a new option in the beta in Edit | Preferences > Advanced (scroll to the bottom) to use retail Edge instead of WebView2 runtime. Can you let me know if this makes any difference?
Now I get this instead. This is my work machine. I have less control. I don't think my personal notebook exhibits this behavior but I will check.
System.InvalidOperationException - Black results.
I uninstalled Version 7 and reinstalled it. It is working now.