Visual Studio 2008 Designer is buggy as hell?

Update 18:23: Oh boy, Did I make a booboo!

You can disregard everything posted below. I made a stupid mistake and am very much ashamed. My .aspx, including the page directive below was missing the actual <%@ Page  %> statement. Well, maybe this helps somebody overlooking the same thing, but I am truly sorry for wasting your time :-)

With Visual Studio 2008, the trouble with the nested masterpages not displaying in the IDE has been resolved, but it looks like we're not out of the woods yet. I don't really use the designer, but I today I wanted to check if nested masterpages really are supported, which apparently was like opening pandora's box.

I am running into two problems for which cannot find a fix anywhere on the web.

First off: The designer works great for masterpages. Opening a masterpage or nested masterpage in the Visual Studio 2008 designer works like a charm. Trouble start when you want to create pages based on these masterpages (who would want to do that?). 

Problem 1: Custom declarative properties break the designer entirely

I am used to working with a common basepage for all my .aspx files, to add not only common functionality, but also common properties to set for each page. I use these properties declaritively, like so:

<%@
   Language = "C#"
   MasterPageFile = "~/includes/masterpages/Product.master"
   Inherits = "LuaLayout.Common.BasePage"
   EnableSessionState = "False"
   EnableViewState = "False"
   Title = "Lua 3 Column Layout"
   Keywords = "Lua, Rocks, !"
   MetaDescription = "This layout was created by Rinze Cats"
%>

Both keywords and metadescription are public properties defined in Common.BasePage. They work, but get the red underlining you really don't want to see. This I can most certainly live with. However, this completely disables design mode. It's just gives you an error that there's a problem with some controls on your page.

Problem 2:
This one is really getting to me. The designer appears to cache certain page settings which it will not release, not even when restarting the entire development environment. For example, changing the masterpage in the above MasterPageFile Directive does not change anything in the designer. It simply does not get updated. It's driving me completely mad. Because of this, I cannot test any further.

Has anybody experienced these problems? I think the first one just might not be supported (which would be very disappointing), the second one looks like a serious bug to me, but all I know is that it's not working. Any help/fixes are greatly appreciated. My VS 2008 build is:  9.0.30729.1 SP. I have looked into the 'Path' problem you read about when searching for designer issues on google, but this is not fixing anything for me. 

Published Wednesday, October 15, 2008 9:41 AM by rinze

Comments

# re: Visual Studio 2008 Designer is buggy as hell?

Wednesday, October 15, 2008 9:02 AM by AndrewSeven

In our project, none of the content pages work in design mode; you can see the master's part of the design but you can't see the content zones.

# re: Visual Studio 2008 Designer is buggy as hell?

Wednesday, October 15, 2008 9:23 AM by Mark Hildreth

I bet that the reason your master page is not being picked up is due to some other error (perhaps the custom attributes in the Page directive?). In my experience, when the designer starts going haywire, it's because the background compiler can't compile your page, but the *.designer.cs file is cause - kind of a chicken and the egg scenario.

It seems to happen more often when registering custom controls on a page. I would temporarily remove the reference to the master page as well as the content place holders so that you can get the designer and associated *.designer.cs file straightened out - that should break the cycle and get everything back on track. Hope that helps,

-Mark

# re: Visual Studio 2008 Designer is buggy as hell?

Wednesday, October 15, 2008 11:51 AM by rinze

Hi mark. I am not registering any customcontrols, but I do think you are write on the money when saying it's background compiler. I have ofcourse removed the custom properties, but apparently it's using a One Strike and you are out policy ;-)

# re: Visual Studio 2008 Designer is buggy as hell?

Wednesday, October 15, 2008 11:51 AM by rinze

Andrew, I see this happening as well, but because so much is going haywire, I'm can't really say anything about the actual nested masterpage support.

Leave a Comment

(required) 
(required) 
(optional)
(required)