我在 Xamarin 中有一个项目,我的 .designer.cs 文件不再嵌套在它的 .cs 文件下,这导致了编译错误。有没有办法再次关联它们以便我可以编译我的项目?请参见下图(ListHeader 与 ListTableView)。
最佳答案
编辑你的项目文件并试试这个:
<Compile Include="ListHeader.cs" />
<Compile Include="ListHeader.designer.cs">
<DependentUpon>ListHeader.cs</DependentUpon>
</Compile>
这两个文件都应标记为Build Action/Compile
。
关于c# - 有没有办法将设计器文件与其 cs 文件重新绑定(bind)/关联?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34010675/