有没有办法将设计器文件与其 cs 文件重新绑定/关联? [英] Is there a way to rebind/associate a designer file with its cs file?
本文介绍了有没有办法将设计器文件与其 cs 文件重新绑定/关联?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在 Xamarin 中有一个项目,我的 .designer.cs 文件不再嵌套在导致编译错误的 .cs 文件下.有没有办法再次关联它们,以便我可以编译我的项目?见下图(ListHeader vs ListTableView).
I have a project in Xamarin, and my .designer.cs file is no longer nested under its .cs file which is causing compilation errors. Is there a way of associating them again so that I can compile my project? See below picture (ListHeader vs ListTableView).
推荐答案
编辑您的项目文件并尝试以下操作:
Edit your project file and try this:
<Compile Include="ListHeader.cs" />
<Compile Include="ListHeader.designer.cs">
<DependentUpon>ListHeader.cs</DependentUpon>
</Compile>
两个文件都应标记为Build Action/Compile
.
这篇关于有没有办法将设计器文件与其 cs 文件重新绑定/关联?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文