Bug 28968 - Code behind designer file not updated for Master page template
Summary: Code behind designer file not updated for Master page template
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: ASP.Net ()
Version: 5.9
Hardware: PC All
: Normal normal
Target Milestone: (C7)
Assignee: Matt Ward
Depends on:
Reported: 2015-04-10 05:15 UTC by Matt Ward
Modified: 2016-05-11 14:12 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Matt Ward 2015-04-10 05:15:54 UTC
To reproduce:

1) Create a new ASP.NET project.
2) Add a Master Page with Code Behind.
3) Make a small change to the master page, say add some white space, then save the master page.

Expected result:

Master page Designer.cs file updated with fields for content place holder tag.

Actual result:

No field created. If you add another asp tag (say asp:Button with runat server) after the contentplaceholder code is not generated for the button.
To have the place holder field created the case of the asp tag in the master page needs to be changed.


<asp:contentplaceholder id="contentPlaceHolder" runat="server" /> 


<asp:ContentPlaceHolder id="contentPlaceHolder" runat="server" />

So a quick fix would be to fix the file template.
I am assuming that the lower case version is valid so possibly a better fix would be to support code generation for the tag even if the case does not match. Currently the code looks up the type based on the name in the asp tag and the case must exactly match otherwise the type is not found.
Comment 1 Matt Ward 2015-05-05 05:51:17 UTC
This should be fixed in:

Xamarin Studio (master branch)
Commit: https://github.com/mono/monodevelop/commit/0dc41a15ee7ecd9585fb7a69e1a04881a50ba9b3
Comment 2 Abhishek 2016-05-11 14:07:36 UTC
I have checked this issue and able to reproduce this issue at my end.

Screencast for the same: http://www.screencast.com/t/Rloz71b8wfFm

To verify this issue I have checked this issue with latest C7 build both on Mac and Windows Environment.

Now this issue is working fine.

Here is the screencast for the same: http://www.screencast.com/t/R9bKECmN

Hence closing this issue.