更新时间:2023-12-06 09:27:34
我意识到这现在已经是一个老话题了,但是我在VS2010中的一个项目中也发生了类似的事情.无法在表单设计器中编辑表单.
I realise this is quite an old thread now, but I just had something similar happen in one of my projects in VS2010. There was no way to edit the Form in the form designer.
最后,在.csproj文件中找到了问题所在.有一个项目组指定要编译的内容.在商品组标签中,对于我的表单,它具有...
In the end tracked it down to a problem in the .csproj file. There is a item group that specifies what is compiled. Within the item group tag, for my form it had ...
<Compile Include="AreaChart.cs" />
它需要...
<Compile Include="AreaChart.cs">
<SubType>Form</SubType>
</Compile>
缺少SubType XML标记.快速更改项目文件,我可以再次编辑表单.
The SubType XML tag was missing. A quick change to the project file and I could edit the form again.