Search

Editing existing .aspx regenerates designer.cs (good) but most of the controls are now missing (bad) by mwolski

Active

22
0
Sign in
to vote
Type: Bug
ID: 534086
Opened: 2/16/2010 4:36:33 PM
Access Restriction: Public
0
Workaround(s)
16
User(s) can reproduce this bug
Converted an existing VS2008 web application over to VS2010 with no conversion errors/issues. Site was kept at .Net 2.0. Site runs fine in all respects, but there is a problem editing .aspx files.

If we edit one of the files (say add a new <asp:Panel> to it), the designer.cs file is regenerated to reflect the page. Problem is, we see the new variable for the panel, but most of the already existing controls are now removed and un-declared. This happens on most pages, and we have not narrowed down why. But we believe the parser throws an error and skips a large portion of the .aspx file when generating the properties for page controls.

This has been verified by another post on the web (but not in any bug report that I could find).
Details (expand)

Product Language

English

Version

Visual Studio 2010 Release Candidate

Operating System

Windows 7

Operating System Language

English

Steps to Reproduce

Convert a project from VS2008 using .Net 2.0 and keep it using .Net 2.0
Open an existing .aspx file (~1000 lines large containing a mixture of custom controls and standard aspx controls)
The .aspx file uses a master page
The .aspx file also has <Script> declarations for javascript within it
Note: At least one of the custom controls on the page hosts other controls and declares a [ParseChildren(typeof(XXXXX))] declaration on it.

Within one of the <asp:content> sections of the page, add a new declaration for a control. Say a: <asp:Panel id="panTest" runat="server"></asp:Panel>
Save the Page

Actual Results

Most (not all) control declarations in the designer.cs file are now missing and page compilation fails.

Expected Results

All existing declarations still exist in the designer.cs file, and a new one added for the new <asp:Panel> you added.
      You can indicate your satisfaction with how Microsoft handled this issue by completing this quick 3 question survey. [Details]

 

File Attachments
0 attachments
Sign in to post a comment.
Posted by Vs2010Dummy on 10/18/2010 at 2:50 PM
This still is not fixed for X64 based systems. Using the convert to web app does not work. The hotfix will not apply to an X64 based system (it is blocked for some reason).
Posted by frogydev on 8/12/2010 at 11:39 PM
Hello, I have the same problem with VS2010 Profesional - designer.cs file is generated incorectly. I've tried to install pacth KB981167 but this error occured: KB981167 does not apply, or is blocked by another condition on your computer.
Posted by Vs2010Dummy on 3/25/2010 at 4:34 PM
On march 24th windows update installed updates which RE BROKE THESE!, (must have covered up code
for HotFixes, ANYBODY ELSE NOTICE THIS?, The VS10-KB980920, and VS10-KB981167
worked from march 8th until march 25th !!
Posted by Microsoft on 3/5/2010 at 2:33 PM
A patch for this issue for Visual Studio 2010 RC is now available for download:
http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=27117
Posted by Nicko Satria Utama - another on 2/23/2010 at 9:06 PM
It makes me to uninstall VS 2010 RC and back to Beta 2.
Posted by Martin.Robins on 2/19/2010 at 12:20 PM
Please also see bugs 532641, 533071, 533945 & 533302.
The list of how many times this has been reported is getting quite long now!
Posted by Microsoft on 2/18/2010 at 11:39 AM
hanks for the report. Many customers are running into the same issue with other controls. We are working on a fix for this problem for the final release. We are also considering releasing a patch for the RC build.
Posted by Microsoft on 2/18/2010 at 11:31 AM
Thanks for the report. Many customers are running into the same issue with other controls. We are working on a fix for this problem for the final release. We are also considering releasing a patch for the RC build.
Posted by Microsoft on 2/17/2010 at 1:34 AM
Thank you for your feedback, We are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Posted by MPAULUS on 2/16/2010 at 5:04 PM
Here is a link to the bug that I created that reports the same issue but in VB.NET

https://connect.microsoft.com/VisualStudio/feedback/details/533945/code-generation-in-2010-rc-doesnt-work-the-same-as-2008-for-asp-net-application
Sign in to post a workaround.