Error CS1595 with web application running in Release mode

G

Guest

I have an ASP.NET application that runs just fine on our servers (Win2003, in
dev/staging/prod) when the debug attribute of <system.web><compilation
/></system.web> is set to true, thusly:

<system.web>
<compilation defaultLanguage="c#" debug="true" />
</system.web>

However, set the attribute to false, so that pages are built as Release
quality, and the page, which a moment ago was running just fine, falls flat
on its face with the following error message:

Description: An error occurred during the compilation of a resource required
to service this request. Please review the following specific error details
and modify your source code appropriately.

Compiler Error Message: CS1595: '_ASP.Publication_ascx' is defined in
multiple places; using definition from
'c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\admin\a5c6f888\308a711\znnk7fxy.dll'

Now Publication.ascx is defined in several places, for instance:

~/Controls/Common/RadioLists/Publication.ascx
~/Controls/Common/DropDownLists/Publication.ascx
~/Controls/Common/Display/Publication.ascx

so I could understand if the compiler baulked at it whatever build
configuration was being used, but why should it work fine in Debug but not in
Release?

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q318274 doesn't seem
to address the specific problem, and neither does
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q833268.
 
G

Guest

This happens (among other reasons) when previous instances of JIT or
otherwise compiled assemblies are left over. So the runtime is finding the
same assembly / namespace defined in multiple places. Delete the contents of
the ASP.NET Temporary Files folder. Restart IIS if necessary.
Peter
 
G

Guest

Thanks for the reply, Peter. I gave it a go (1Gb+ of temp files? No wonder I
was running low on disk space!), but it didn't make any difference.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top