<p>Every few days VS2008 decides to get mad at me and fails to generate a designer file claiming it cannot find the file specified and that it's missing an assembly.  Here's the scenario:</p>

<p>The aspx page has a reference to a custom user control (inheriting UserControl) which references another assembly in the backend.  There are many other references to this "missing" assembly in other places in code which don't throw errors.  rebuilding, updating the source to the clean copy, shouting at the computer, punching the screen, etc all fail to work.</p>

<p>Any suggestions?  This is quite annoying.</p>

[{'answer_id': 32810, 'author': 't3rse', 'author_id': 64, 'author_profile': 'https://Stackoverflow.com/users/64', 'pm_score': 0, 'selected': False, 'text': '<p>You might try archiving a template of a new file with its designer equivalent. If VS coughs then you can do an "Add Existing" option with the file you already have. </p>\n\n<p>It seems, however, to be an issue with your installation of VS2008 so you might try reinstalling it. </p>\n'}, {'answer_id': 32865, 'author': 'jColeson', 'author_id': 3422, 'author_profile': 'https://Stackoverflow.com/users/3422', 'pm_score': 4, 'selected': True, 'text': '<p>We\'ve had similar problems before, unfortunately I don\'t remember the exact solution. </p>\n\n<p>If your using a "Web Site" project (no project file) then start by checking that both your page and your control both set the ClassName property in the first line of your aspx/ascx file and that you specify the full name of the class including the namespace. </p>\n\n<p>Example:</p>\n\n<blockquote>\n  <p>&lt;@Control Language="VB" AutoEventWireup="false"\n  ClassName="YourProjectName.YourUserControl"\n      Inherits="YourProjectName.YourUserControl"\n  CodeFile="YourUserControl.ascx.vb"\n  %></p>\n</blockquote>\n\n<p>Many times not setting all of these will still work but you will get odd compiler errors and behavior in VS.</p>\n\n<p>If you using a Web Site Application project try deleting the designer file manually and then right click on your project and choose "Convert from Web Application." This will should recreate the designer file for you.</p>\n\n<p>My only other suggestion would be to recreate the page and/or the user control from scratch. </p>\n'}, {'answer_id': 32905, 'author': 'Pauly', 'author_id': 3460, 'author_profile': 'https://Stackoverflow.com/users/3460', 'pm_score': 2, 'selected': False, 'text': '<p>Jared, you\'ve hit it.  Using "Convert to Web Application" to manually generate the designer file solves my problem.  I\'m glad you posted this before i started reinstalling.  Thanks.</p>\n'}, {'answer_id': 2024052, 'author': 'omencat', 'author_id': 190124, 'author_profile': 'https://Stackoverflow.com/users/190124', 'pm_score': 0, 'selected': False, 'text': '<p>I found that using a custom control, you would need to add a reference to the .dll. This fixed it for me after migrating from a web site to web app.</p>\n'}]
['https://Stackoverflow.com/questions/32766', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3460/']