有没有办法将设计器文件与其cs文件重新绑定/关联?

Dra*_*age 3 c# ios xamarin

我在Xamarin中有一个项目,我的.designer.cs文件不再嵌套在.cs文件下,导致编译错误.有没有办法再次关联它们,以便我可以编译我的项目?见下图(ListHeader与ListTableView).

解决方案层次结构.

Sus*_*ver 7

编辑项目文件并尝试以下操作:

<Compile Include="ListHeader.cs" />
<Compile Include="ListHeader.designer.cs">
   <DependentUpon>ListHeader.cs</DependentUpon>
</Compile>
Run Code Online (Sandbox Code Playgroud)

这两个文件都应标记为Build Action / Compile.