VS 2022 自行加载导入

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

VS 2022 17.9 习惯于自行向 WPF 应用程序添加导入。我会收到类似“.ToolTip is not a member of Button”的错误 - 当我返回页面时,我发现已添加了各种导入,如下所示:

Imports WinRT
Imports Microsoft.Graph.Models
Imports Xceed.Wpf.AvalonDock.Themes
Imports System.Windows.Forms
Imports DevComponents.WpfEditors
Imports Microsoft.Graph.Groups.Item.Planner.Plans.Item.Buckets.Item.Tasks.Item.Details
Imports Microsoft.Graph.Groups.Item.Planner.Plans.Item.Details
Imports Microsoft.Graph.Groups.Item.Planner.Plans.Item.Tasks.Item.Details
Imports Microsoft.Graph.Models
Imports Microsoft.Identity.Client.NativeInterop
Imports Windows.Security.Authentication.Web.Provider

有什么办法可以阻止这种行为吗?

vb.net visual-studio-2022
1个回答
0
投票

您可以取消选中“在粘贴时添加缺少的导入”。

可在“选项”→“文本编辑器”→“Visual Basic”→“高级”→“导入指令”中使用。

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