I'm using VS2022, .NET7.0.
I'm trying to implement a function that automatically connects the SerialPort using USB's vid and pid.
I found that it was easier to implement by refering to this article rather than this article.
But, I can't use the Windows
namespace in Winform
.
I tried the Nuget\Install-Package Windows
using PM, but it failed.
I add the <TargetPlatformVersion>8.0</TargetPlatformVersion>
in .csproj
of project and looked at the References Manager, but it hasn't changed.
Tried reinstalling Windows SDK 10, same thing.
How to solve this problem?