Options
CS0518 Predefined type 'System.String' is not defined or imported - Can't run any queries
LinqPad was working fine until last night.Just tried to run a query, and I get the error shown above. I also get wads of errors of the form...
Reference 'C:\Program Files\dotnet\packs\Microsoft.NETCore.App.ref\9.0.5\ref\net9.0\System.Numerics.dll' does not exist. Press F4 to fix.
Reference 'C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.ref\9.0.5\ref\net9.0\UIAutomationProvider.dll' does not exist. Press F4 to fix.
There are mases of these.
Don't know if it's relevant, but I updated Visual Studio last night.
Either way, anyone know how I fix this? I can't use LinqPad at the moment, and that's serious!
Thanks
Comments
Duh, just restarted LP and it worked fine!
Please ignore this thread. Don't know if I can delete it, but if an admin can, please do.
It tends to happen from time to time, especially if you leave it running for a long time. I presume it was a windows update (or other process) that updates the libraries and breaks the redirects to the correct versioned assemblies. At least it doesn't affect currently running processes. Restarting fixes it, don't know if it's something that can be fixed.
Thanks Jeff
That's right. Most likely, Windows automatically installed .NET 9.0.6 and deleted .NET 9.0.5 while LINQPad was running.
Very likely. LinqPad gets started as soon as I start the PC, and never gets closed!
As I mentioned, I updated VS, which probably installed the new version of .NET.