I have a .NET 4.0 console application that generates SQL and stores it in a string variable. I want this string to be copied directly to the clipboard.
So far, all my research indicates that the ONLY way this can possibly be done is by adding a reference to System.Windows.Forms. I do not want to add a reference to an assembly that is irrelevant to a console application.
Within the universe in which we currently exist, is there a known method of copying a string of text to the clipboard within a console application that does not involve adding a reference to System.Windows.Forms nor any other assembly whose purpose is irrelevant to a bare-bones console application?