Copy/paste-able namespace and nuget references
Copy/paste-able namespace and nuget references.
I often copy/paste LINQPAD snippets between computers (over RDP), chats, OneNote etc. This works great if the snippet has default namespace and no nuget references. However, when it does, Copy/Paste takes a bit more work to re-setup namespaces.
Would be great if LINQPAD had "Show namespace and nuget comment" option, or "Edit->Copy complete snippet", embedding the <Query> part of the script into comments. E.g.
// #@kind Statements
// #@ref <RuntimeDirectory>\System.Windows.Forms.dll
// #@using System.Windows.Forms
MessageBox.Show("Hello");
Or just
/* @#Linqpad
<Query Kind="Statements">
<Reference><RuntimeDirectory>\System.Windows.Forms.dll</Reference>
<Reference><RuntimeDirectory>\System.Security.dll</Reference>
<Reference><RuntimeDirectory>\System.Configuration.dll</Reference>
<Reference><RuntimeDirectory>\Accessibility.dll</Reference>
<Reference><RuntimeDirectory>\System.Deployment.dll</Reference>
<Reference><RuntimeDirectory>\System.Runtime.Serialization.Formatters.Soap.dll</Reference>
<Namespace>System.Windows.Forms</Namespace>
</Query>*/
MessageBox.Show("Hello");