Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to rebind/associate a designer file with its cs file?

Tags:

c#

ios

xamarin

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).

Solution Hierarchy.

like image 499
Dragonrage Avatar asked Oct 12 '25 21:10

Dragonrage


1 Answers

Edit your project file and try this:

<Compile Include="ListHeader.cs" />
<Compile Include="ListHeader.designer.cs">
   <DependentUpon>ListHeader.cs</DependentUpon>
</Compile>

Both files should be flagged as Build Action / Compile.

like image 160
SushiHangover Avatar answered Oct 14 '25 11:10

SushiHangover



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!