Forum Discussion
Clipboard class in .Net 6
My bad...
I was able to access Clipboard after adding the following line to my csproj file, in the PropertyGroup element:
<UseWindowsForms>true</UseWindowsForms>.
So the PropertyGroup tag looks like this:
<PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<IsPackable>false</IsPackable>
</PropertyGroup>
KenB-LA I have tried that solution, to no avail. My configuration file looks like :
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<EnforceCodeStyleInBuild>False</EnforceCodeStyleInBuild>
</PropertyGroup>
- KenB-LADec 23, 2021Copper Contributor
Try changing the target framework to:
<TargetFramework>net6.0-windows</TargetFramework>- SilentKnightERDec 23, 2021Copper ContributorYes, 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!