Note that there are some explanatory texts on larger screens.

plurals
  1. POCould not load file or assembly App_Web_ * with a precompiled ASP.NET website project
    text
    copied!<p>I'm getting this problem on a very specific page and I'm not sure how to fix it. I've already found several SO questions (such as <a href="https://stackoverflow.com/questions/784157/asp-net-corrupt-assembly-could-not-load-file-or-assembly-app-web">ASP.NET corrupt assembly &quot;Could not load file or assembly App_Web_*&quot;</a> and <a href="https://stackoverflow.com/questions/5538454/could-not-load-file-or-assembly-app-web-xxxxxxxx-or-one-of-its-dependencies">Could not load file or assembly App_Web_xxxxxxxx or one of its dependencies</a>) and tried their solutions, but to no avail.</p> <p>To recap, here's what I've tried:</p> <ul> <li><p>Set <code>batch="false" numRecompilesBeforeAppRestart="50"</code> in the web.config</p></li> <li><p>Restarted the IIS website that hosts this website</p></li> <li><p>Cleared the ASP.NET temporary files in <code>%windir%\Framework64\v4.0.30319\Temporary ASP.NET Files</code></p></li> <li><p>Reployed</p></li> </ul> <p>... and any combination of the above, but to no avail. It works perfectly fine when I attempt to run the site from VS and when I deploy the website without pre-compilation. </p> <p>Here are some specs of the enviroment:</p> <ul> <li><p>Pre-compilation is done through a Web Deployment Project. It does not matter if TFS or I did the precompilation: the problem persists</p></li> <li><p>.NET version is 4.0.30319</p></li> <li><p>AppPool settings: Pipeline mode is Integrated on .NET 4.0</p></li> </ul> <p>This is the specific error, which occurs when I open <code>Customer.aspx</code>:</p> <p><code>Could not load file or assembly 'App_Web_qxcfa0wv, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.</code></p> <p>This page has registered a control called <code>UserManagement.ascx</code>, located at <code>~/Controls/UserManagement.ascx</code>. </p> <p>That control has registered another control called <code>UserDialog.ascx</code>, which is located at <code>~/Controls/Dialogs/UserControl.ascx</code>.</p> <p>And that last control uses a control called <code>~/Controls/User.ascx</code> which encapsulates the data of a user. There are no further dependencies.</p> <p>According to the stack trace, the error is on line 1 of <code>UserDialog.ascx</code> (The <code>&lt;%@ Control ... %&gt;</code> directive).</p> <p>I'm at a loss. My <em>guess</em> is that it doesn't work because <code>~/Controls/Dialogs/UserDialog.ascx</code> requires a control which is in a parent folder, which results in some out of date reference during runtime. Kind of like the problem description in the first SO question. </p> <p>However, I can't test that simply by excluding the <code>~/Controls/User.ascx</code> control because then I'm getting circular reference errors in another control which is used in <code>~/Control/UserDialog.ascx</code>, even though that control doesn't register any other controls, either. Only a namespace registration, which <em>is</em> used by most other controls. </p> <p>I'd say that the circular reference and the error are related, though, but I can't quite say how. Not without drawing an entire dependency graph.</p> <p>Any ideas?</p> <p>Thanks in advance!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload