如何在 Visual Studio 2019 中引用程序集? .NET Core 上的 WPF

问题描述 投票:0回答:1

我正在尝试使用

FolderBrowserDialog
创建 WPF 应用程序,并且我知道我需要添加对
System.Windows.Forms
的引用。唯一的问题是,没有任何来源说明如何在 Visual Studio 2019 中执行此操作。

主要区别在于我的解决方案资源管理器中,引用的位置称为

Dependencies
,而在每个人的 VS 上,它称为引用?那是怎么回事?当我尝试添加对窗口的引用时,我没有装配选项卡,这就是我的意思:

这就是它应该的样子:

This is what it's supposed to look like,

这就是我悲伤的事情:

and this is what I sadly have

我很惊讶竟然会这样,请问有什么原因吗?

c# wpf xaml .net-core visual-studio-2019
1个回答
0
投票

不要创建

WPF Application
,请创建
WPF App (.NET Framework)

差异

wpf application

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.