Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
204 views
in Technique[技术] by (71.8m points)

c# - Add reference not showing in vs 2019 on mac

It is my first time using visual studio 2019. So, I wanted to use the Clipboard class. In order to use the clipboard class, it looks like I have to add a reference, then import using System.Windows.Forms. However, when I right-click on the solution area, then press add reference, it just gives me an empty page.

So, I searched up the problem and people fixed the problem by enabling codelens. However, I found that there were no codelens for mac.

How can I fix the problem with the add reference? Also, I wanted to know how to import the Clipboard class or if I was doing it right?

question from:https://stackoverflow.com/questions/65913323/add-reference-not-showing-in-vs-2019-on-mac

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Windows Forms is not supported on macOS, so you won't be able to use that class.

Either you use Xamarin.Essentials or use the native NSPasteboard.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...