今天我的项目发生了一些不好的事情,我丢失了我的表单(如果我查看设计),但如果我启动该程序,表单就是Ok,包含我之前插入的所有项目。
我意识到Form1.cs不是Form1.Designer.cs
如何在设计模式下恢复表单?
答案 0 :(得分:1)
在NotExad ++等TextExitor中打开AudioPlayer.csproj,找到Form1.Designer.cs,然后添加DependentUpon节点:
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
根据您的上一条评论,有两个InitializeComponent方法,请同时验证两者并删除其中一个。