c# - WinForm 类作为类而不是设计模式打开

标签 c# winforms visual-studio-2013 windows-forms-designer

我正在处理一个 WinForm,由于未知原因,我无法再在设计模式下打开它,任何(只有那个特定的窗体)。无论如何要告诉 Visual Studio 2013 它是一个 WinForm 而不是一个类?

enter image description here

最佳答案

您可以“卸载”项目,然后编辑 .csproj 文件。搜索您的 .cs 文件,并插入一个 SubType 节点... <Compile Include="Scraper.cs"><SubType>Component</SubType></Compile> .保存 .csproj 并重新加载您的项目。

关于c# - WinForm 类作为类而不是设计模式打开,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22963291/

相关文章:

c# - 如何通过C#解析markdown

c# - 在 Windows Phone 7 上创建视频文件

c# - 我正在使用 linq 语句更新数据库中的数据

c# - 错误 "An object reference is required for the non-static field, method or property ' QuickSharp.CokeMachine.TotalInsertedCoins'”

c# - Windows 窗体中的自定义选项卡控件

c# - 带有不可编辑文字(标签)的文本框

cmake - 如果之后更改路径,则 cmake 上的相对路径/错误

c# - ConnectionString 中的可变密码

c++ - MSVC 2013 'type': 不是 'std::enable_if<false,void> 的成员

C# 和 MySql,在两个日期之间选择