我正在构建非常小的 15 分钟应用程序,这些应用程序可以帮助我和我的同事处理简单的日常业务工作。
为此,我经常使用 WinForm,因为只需制作一个带有 2 个文本框和一个提交按钮的窗口,它的速度就太快了。
不幸的是,最近我想我点击了一个按钮,图形编辑器将不再打开。我将始终处于文本编辑器 View 中。
在网上我找不到任何关于如何打开这个该死的设计器的信息。我希望你们中有人知道答案。
最佳答案
如果您使用的是 Visual Studio 2019,您可能使用 .Net Core 3.0 创建了 Windows 窗体:
如果您的目标是 .NET Core,Visual Studio 2019 还没有适用于 WinForms 的设计器。 .NET Framework 版本应该适合您的情况。如果由于某种原因您的应用程序需要 .NET Core,您可以使用 WinForms Designer for Visual Studio 2019 的预览版,可在此处获取:https://devblogs.microsoft.com/dotnet/introducing-net-core-windows-forms-designer-preview-1/
2019 年 12 月 10 日更新: 如果您运行的是 Visual Studio 2019 16.5 Preview 1,则不再需要 VSIX 即可让设计人员在 .NET Core 上使用 WinForms。
来自.NET Blog :
To use the designer:
- You must be using Visual Studio 16.5 Preview 1 or a later version.
- You need to enable the designer in Visual Studio. Go to Tools > Options > Environment > Preview Features and select the Use the preview Windows Forms designer for .NET Core apps option.
关于c# - Visual Studio 不再打开 Winforms 的图形编辑器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58482401/