Clipboard class in .Net 6

New Contributor

I am upgrading some code from .Net Framework 4.62 to .Net 6.  I use the Clipboard Class in System.Windows.Forms.  In .Net 6 this is no longer supported.


is there a different namespace where Clipboard has been moved?  

4 Replies

My bad...
I was able to access Clipboard after adding the following line to my csproj file, in the PropertyGroup element:



So the PropertyGroup tag looks like this:








@KenB-LA I have tried that solution, to no avail. My configuration file looks like :




Try changing the target framework to:

Yes, and thank you. I am not sure when you posted this.....But I wish I had seen it earlier! I had spent all morning with this, and just posted the solution to Overstack a few hours ago lol. smh.

Strong work though, and I could have saved a lot of time if I was paying attention to my email!