CS0246 The type or namespace name 'This' could not be found (Press F4 to check imported namespaces
So I just ran LINQPad as usual and running any query (even a blank one) gave this error: CS0246 The type or namespace name 'This' could not be found (Press F4 to check imported namespaces)
When I pressed F4 I saw this in the Additional Namespace imports: This.File.Is.Not.Used.Anymore
Also, Additional References were empty.
What file is "This.File" and what should I use instead of it? I see nothing about this in "What's New" nor on the linked http://www.linqpad.net/PortableDeployment.aspx page.
When I pressed F4 I saw this in the Additional Namespace imports: This.File.Is.Not.Used.Anymore
Also, Additional References were empty.
What file is "This.File" and what should I use instead of it? I see nothing about this in "What's New" nor on the linked http://www.linqpad.net/PortableDeployment.aspx page.
Comments
Can you submit a bug report (Help | Report Bug) and check 'Include Current Query'. Also, please include your email address and a note referencing this thread, so that I can give it priority.
Also, if there is anything in your My Extensions query, (or if it references anything), let me know.
I tried deleting and re-creating DefaultQuery.xml in the LINQPad directory and the problem went away. When I re-created "%appdata%\LINQPad\DefaultQuery.xml" I could repro the problem again. It would appear that LINQPad 5.08.01 reads whichever file has the later creation time.
If so, this is behaviour that badly violates the principle of least surprise - a user would have no way of figuring out what's happening, let alone expect that this is what the program would do.
It looks for DefaultQuery.xml first in the LINQPad directory, and if it doesn't find it there, it looks for it in %appdata%\LINQPad.