Generation of designer file failedhttp://forums.asp.net/t/1242703.aspx/1?Generation+of+designer+file+failedThu, 01 Jan 2009 00:38:51 -050012427032274523http://forums.asp.net/p/1242703/2274523.aspx/1?Generation+of+designer+file+failedGeneration of designer file failed <p>There's only one thing I can say: aaaaaaaaaaaaaa (long scream). VS2008 is driving me up the wall. I get these IDE errors quite frequently; and a friend of mine even more often. It usually happens when either we copy some block of aspx code from some other place, or when we just created a new user control and manually registering it in the aspx, or just plain randomly without a rhyme or reason. Sometimes closing the aspx file and reopening it fixes the problem, sometimes we have to actually comment any code behind code then reopen the file and that does it. Other times, the majority, none of these work and we have to restart VS. In a few cases even&nbsp;a restart won't&nbsp;fix it and then we have to&nbsp;be creative -- basically try random weird things.&nbsp;In all these cases the aspx is valid and if we actually run the application it works fine, it's the IDE that has a problem generating the designer file. Is this a known problem or am I the only one,&nbsp;is there a bug that we can vote on? I've experienced similar issues in VS2005, but in VS2008 the number of these has grown exponentially :(</p> <p>Thanks.</p> 2008-04-03T14:56:19-04:002275393http://forums.asp.net/p/1242703/2275393.aspx/1?Re+Generation+of+designer+file+failedRe: Generation of designer file failed <p>The good news ... you're not alone ... here are some related posts:<br> </p> <ul> <li><a href="/p/1233688/2233396.aspx#2233396">controls not added to designer.cs</a></li><li><a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2051545&amp;SiteID=1">Forcing regeneration of the designer.cs file</a></li><li><a href="/p/1238260/2254119.aspx#2254119">Can't Reference New Controls by ID</a><br> </li></ul> <p>&nbsp;</p> <p>The bad news ... there is no solution or work-around, that I'm aware of.</p> <p>&nbsp;</p> 2008-04-03T21:06:55-04:002275563http://forums.asp.net/p/1242703/2275563.aspx/1?Re+Generation+of+designer+file+failedRe: Generation of designer file failed <p>Well, thanks for the good news :)</p> <p>My impression is that there's something that doesn't get cleaned up properly in the IDE because once you start seeing these errors is all downhill, but not always -- you may as well restart. The worst part is that you lose the trust. Is it me or the IDE? Here starts another witch hunt which completely distracts from what you were doing. Something that should have taken a second or two ends up taking minutes.</p> <p>I really wish they would decouple the designer from the aspx editing. From some of the links you posted it gives me the impression that is somewhat tied to the designer; which I believe is true since sometimes switching to design view fixes the problem. There's no UI feedback telling me that the designer or something else&nbsp;is working. It should be a blocking operation; I'd prefer something like &quot;please wait, updating the designer file&quot; rather than me trying to guess when it's doing it and waiting or it may break. Arrr, so fragile; this needs to be fixed somehow.</p> <p>Thanks.</p> 2008-04-03T23:11:08-04:002275644http://forums.asp.net/p/1242703/2275644.aspx/1?Re+Generation+of+designer+file+failedRe: Generation of designer file failed <p>I haven't seen any other mention of the differences in the header comment, Runtime versions ( see my first post here: <a href="/p/1233688/2233396.aspx#2233396">controls not added to designer.cs</a> ).</p> <p>Could you please comment as to whether this is your experience as well.&nbsp;</p> 2008-04-04T00:27:22-04:002276820http://forums.asp.net/p/1242703/2276820.aspx/1?Re+Generation+of+designer+file+failedRe: Generation of designer file failed <p>1. Yes, I always use WebApplication<br> 2. Yes, I only switch to design view when I need to wire up an event handler, so most of the time I never see the designer<br> 3. Happens in both aspx and ascx<br> 4. Never noticed the version number, next time it happens I'll make sure&nbsp;to pay attention to the version number and let you know.</p> 2008-04-04T14:08:42-04:002277060http://forums.asp.net/p/1242703/2277060.aspx/1?Re+Generation+of+designer+file+failedRe: Generation of designer file failed <p>ASPX editing is not coupled to HTML designer. Name *.designer.cs file name somewhat misleading, it actually means &quot;design-time generated code&quot; it really has nothing to do with Design view. Now, if switching to and from Design view helps, perhaps IDE is not getting idle time, some hints here: <a href="http://blogs.msdn.com/mikhailarkhipov/archive/2008/04/02/wireless-mouse-html-editor-and-idle-time-processing.aspx"> http://blogs.msdn.com/mikhailarkhipov/archive/2008/04/02/wireless-mouse-html-editor-and-idle-time-processing.aspx</a></p> 2008-04-04T15:46:36-04:002277148http://forums.asp.net/p/1242703/2277148.aspx/1?Re+Generation+of+designer+file+failedRe: Generation of designer file failed <p>I personally never use design view ... and I've heard the suggestion before that it might be related to lack of idle time ... but I highly doubt that that's the problem in my case.</p> <p>When I've encountered the problem, it's been specific to an <i>instance</i> of an aspx/ascx file.&nbsp; In those cases, the designer file <i>never</i> gets updated, whereas the designer file in other <i>instances</i> seems to continue to still work fine.</p> <p>One thing I've noticed, which I pointed out in this post (<a href="/p/1233688/2233396.aspx#2233396">controls not added to designer.cs</a>), was that the header comment, in the designer file, shows different runtime versions between those where it's working and those where it's broken.</p> <p>Something else that might be relevant is that this is an old project, created originally in VS2003, so it's using the WebApplication extension.&nbsp;</p> 2008-04-04T16:26:31-04:002278498http://forums.asp.net/p/1242703/2278498.aspx/1?Re+Generation+of+designer+file+failedRe: Generation of designer file failed <p>Mikhail,</p> <p>The coupling I was talking about it's not necessarily a hard coupling. I know that until you switch to design mode the &quot;designer&quot; will not even load, and the source view is fine without the designer being loaded. What I meant is that in some cases these errors will not go away until I switch to design mode, and hence the &quot;coupling&quot; I was talking about.</p> <p>The idle time you mentioned may have something to do with this, I don't know, but what's interesting is that usually once I start getting these errors they won't stop. It's almost as if something gets stuck in the internals of the IDE and me waiting on it to finish doesn't seem to fix it.</p> <p>Are you aware of a bug report on this? I couldn't find an existing report on this problem and I rather not create a duplicate; or if you guys already work on this I rather just wait.</p> <p>I'm using Windows 2003, not Vista, although I have a wireless mouse is not a Microsoft wireless mouse, and the problems Rick was talking about are in the designer which I only use to wire up event handlers.&nbsp;</p> <p>Thank you. <br> </p> 2008-04-05T13:33:20-04:002284965http://forums.asp.net/p/1242703/2284965.aspx/1?Re+Generation+of+designer+file+failedRe: Generation of designer file failed <p></p> <blockquote><span class="icon-blockquote"></span> <h4>grundt</h4> <p>I haven't seen any other mention of the differences in the header comment, Runtime versions ( see my first post here: <a href="http://forums.asp.net/p/1233688/2233396.aspx#2233396">controls not added to designer.cs</a> ).</p> <p>Could you please comment as to whether this is your experience as well.&nbsp;</p> <p></p> </blockquote> <p></p> <p>The last few times I got the error the version number was always 2.0.50727.1433 for me.</p> 2008-04-08T22:15:48-04:002364833http://forums.asp.net/p/1242703/2364833.aspx/1?Re+Generation+of+designer+file+failedRe: Generation of designer file failed For a work-around to this problem ( to re-generate the designer file ), see this post:&nbsp;<a href="/p/1233688/2364815.aspx#2364815"> Re: Controls not added to designer.cs</a><br> 2008-05-18T21:16:54-04:002413822http://forums.asp.net/p/1242703/2413822.aspx/1?Re+Generation+of+designer+file+failedRe: Generation of designer file failed <p>I have the same problem. I observed that if I register the ScriptManger&nbsp;in the page, then the designer file generation is fine, on the other hand, if I&nbsp;move the &nbsp;the control registrition&nbsp;&nbsp;into web.config, then it wiil fail to update the designer file when controls are being added or removed.&nbsp;It seems that the config file is causing problems wiith ajax,&nbsp;but&nbsp;&nbsp;I can't find any obvious error in the web.config file,&nbsp;and the site builds and runs fine. I further observed, it's not just ScriptManger, this phenomena also occurs for other custom controls.</p> 2008-06-10T16:22:00-04:002413868http://forums.asp.net/p/1242703/2413868.aspx/1?Re+Generation+of+designer+file+failedRe: Generation of designer file failed <p>That's very interesting. Were you able to reproduce the problem? I have a closed bug report about this,&nbsp;but I can open it if I can find a way to reproduce it. I've been trying to reproduce it for a while now. Haven't thought about the web.config registration. You may be up to something.</p> 2008-06-10T16:40:01-04:002430692http://forums.asp.net/p/1242703/2430692.aspx/1?Re+Generation+of+designer+file+failedRe: Generation of designer file failed <p>Not sure is this this thread is dead or not. but i'd like to throw my lot in as well. I'm getting exactly the same problem as well. I tried several different was of coercing a VS2003 project into a VS2008&nbsp;project (including the conversion tool of course)&nbsp;and it wasn't working so i resorted to creating the files within VS2008 and then copy/pasting from the ASPX / ASCX files into them. However, what I noticed was that the designer.cs was updated for the controls pasted in. In VS2005 it was possible to recreate/refresh the designer.cs by activating the design view but this no longer seems to work. The upshot of all this though is that none of the controls are recognised in the code behind unless i manually enter them into the designer.cs partial class.</p> <p>I'm desperate for a solution, life is too short for this cut and past stuff...</p> <p>I'm using VS2008 with hotfix rollup and Resharper 4. Project in VS2008 was created as a web application project .net 3.5</p> 2008-06-18T11:09:02-04:002431103http://forums.asp.net/p/1242703/2431103.aspx/1?Re+Generation+of+designer+file+failedRe: Generation of designer file failed <p>Going from 2003 to 2008 is a different story, imo. If I remember correctly, in 2003 there was no designer file and all the code was stored inside the codebehind in a (by default) collapsed region. With 2005/2008 if you're missing the designer file you can right click on the .aspx and choose convert to web application (why they called it this beats me, what's wrong with &quot;generate designer file?). However, I believe you won't see this if you already have those regions in the source code, since it thinks you already have a &quot;designer&quot; file. I've converted a few 2003 apps to 2005 a long time ago. From what I remember the path I took was to completely rebuild the application. The conversion doesn't really work, as in it creates a big mess. What I did was to create a new web application, blank one, and one by one add create the aspx and copy and paste the content from the old aspx in the new one. Save the file,&nbsp;this will generate the designer file, and then copy the code behind. It's a very painful process, but if you don't want to carry the old garbage along I recommend this way. And if you do get the error message I mentioned above, just restart VS, don't try to fix it... it's not you :)</p> 2008-06-18T13:25:59-04:002433099http://forums.asp.net/p/1242703/2433099.aspx/1?Re+Generation+of+designer+file+failedRe: Generation of designer file failed <p>This happens for me regurarly. </p> <p>Sometimes it caused by some compilation error, so it could be fixed with recompile or with clean solution and recompile.</p> <p>But sometimes this not works, not helps and the application has no error, in that case the only way which work for me this:</p> <p>- delete the affected designer.cs file</p> <p>- close vs</p> <p>- open vs</p> <p>- clean the solution</p> <p>- recompile</p> <p>- use convert web application for the aspx file to generate the designer file</p> <p>I think this is a bug.&nbsp;</p> 2008-06-19T07:41:23-04:002434860http://forums.asp.net/p/1242703/2434860.aspx/1?Re+Generation+of+designer+file+failedRe: Generation of designer file failed <p>It's definitely a bug; if we could only figure out a way to reproduce it... I see the error a few times a day (it varies), but I can't reproduce it. For me just restarting VS does the trick (I don't delete the designer, clean, or recompile).</p> 2008-06-19T20:02:01-04:002435618http://forums.asp.net/p/1242703/2435618.aspx/1?Re+Generation+of+designer+file+failedRe: Generation of designer file failed <p>I also tried several time to reproduce but cannot. </p> <p>Sometime the designer really cannot be generated, but we have a specific error message for that (duplicate id, incorrect netsing etc.), this is ok.<br> </p> <p>But when I see the infamous general designer error message (when I get one, I will post here), I usually delete the designer file and try to regenerate it, if it fails I know that the bug triggered, and I need to restart vs to fix it.<br> </p> <p><br> </p> 2008-06-20T07:04:10-04:002440282http://forums.asp.net/p/1242703/2440282.aspx/1?Re+Generation+of+designer+file+failedRe: Generation of designer file failed <p>Here is the general error message, which I got 5 seconds ago:</p> <p>Warning&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; Generation of designer file failed: The method or operation is not implemented.&nbsp;&nbsp;&nbsp; line: 0 column: 0 </p> <p>Now time to restart the ide... [:@]<br> &nbsp;</p> <p>&nbsp;</p> 2008-06-23T12:55:18-04:002840817http://forums.asp.net/p/1242703/2840817.aspx/1?Re+Generation+of+designer+file+failedRe: Generation of designer file failed <p>There does not seem to have be any action on this lately, but the but only started appearing for me about two months ago.</p> <p>It only seems to happen for me when I copy a control in&nbsp;&nbsp;a file (while in &quot;Source&quot; view) to somewhere else in the same file. I work with (nested) master pages that have a scriptmanager. The bug is triggered in the standard pages for me (I have not tried if it also happens in the master pages). I hardly ever touch those anymore.</p> Very annoying indeed. For some more info: My header runtime version is<font color="#008000" size="2"><font color="#008000" size="2"></font></font><font color="#008000" size="2"><font color="#008000" size="2"> <p>Runtime Version:2.0.50727.3053</p> </font></font> <p>I work with&nbsp;Web Application projects. Almost always in Source view.</p> <p>VS Version: Microsoft Visual Studio 2008<br> Version 9.0.30729.1 SP<br> Microsoft .NET Framework<br> Version 3.5 SP1</p> <p>Microsoft Visual C# 2008&nbsp;&nbsp; 91605-130-0147673-60515<br> <font color="#008000" size="2"><font color="#008000" size="2"><font color="#008000" size="2"><font color="#008000" size="2"></p> </font></font></font></font> 2009-01-01T00:38:51-05:00