VS2008 .designer.cs regenerating issue
Okay...I'm going nuts about this and don't know why this is happening. Why is "Generation of designer file failed"?
I've a regular ASP.Net C# web application project in Visual Studio 2008. I've one master page under folder called "Master". When I add a new Content ASPX page using this master page (the master page has absolutely nothing in it except the default HTML tags and a form) and save the content page, it gives the following:
This is driving me nuts. :(
I have already performed the following operations but nothing has helped:
- Deleted the webform1.designer.cs file and right click on the .aspx and select "Convert to Web Application". Upon doing this, it gives the same dialog as above.
- Tried devnev.exe /resetsettings with no luck.
- Checked the permission on the folder, I've full permission.
- Tried creating an aspx page without Master page and it works FINE. i.e I don't get the dialog above.
So, I have concluded (without any resolution) that this has something to do with the Master page. I don't know what's wrong.
Is there anybody else facing the similar issue?
Update (12/27/07 1pm EST):
Once you get the error above, it won't go away from the Error List unless you close the Studio and reopen the project. Nuts, really!
7 Comments
Comments have been disabled for this content.
Joe Chung said
Does the problem go away if you change the name of your "Master" folder to something else?
rachitp said
Thanks Joe for your suggestion. No, it doesn't work. I wish it were that simple. :) My solution has two projects: (1) C# Class library (2) web site application project. I tried different way to generate .aspx file (with Master page of course) but it didn't work. Next thing I'll try to see if there something in web.config that's causing this.
Rainer said
The actions that you need to take are: 1. Relax - don't think about rolling back YET 2. Import the following registry file REGEDIT4 [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\WebApplicationProjects\Debug] "LogFile"="C:\\logfile.txt" "Enabled"=dword:00000001 "LogFieldGeneratorFailures"=dword:00000001 3. Reproduce the problem 4. Examine the log file under "c:\logfile.txt" 5. Try fixing yourself (could be very easy)
rachitp said
Rainer, Thanks, I'm relaxed, now. ;) I believe you meant \9.0 instead of \8.0 in the registry addition as we are talking about VS2008. Anyways, I tried with both and although I reproduced the problem, it didn't create any logfile. So, I'm still stuck!
Edmund said
I get a similar cryptic "Generation of designer file failed" when doing a "Convert to Web Application". It is a totaly different scenario, but the only way to get rid of it is to quit and restart VS2008. It then converts successfully.
Have you determined a way to get some more info about why the conversion fails?
Edmund
Rachit said
Edmund, I reinstalled the VS.Net 2008 and it solved the issue. Having said that, it's not the solution but I found that reinstalling was a better choice at that time. Your mileage may vary. Post the comment here if you find the real solution. It'll help others. Thanks
Jason said
Make sure you don't have a compile error. I was missing a register directive for a custom control that I was using in my aspx page. Once I added that, I was able to regen the designer class file by converting to a web application.