Problem: The type 'typename' exists in both 'dll-name-1' and 'dll-name-2'

Hi at all!

For some strange reason I sometimes (not always) get the following compilation error when starting my ASP.net project:

Server Error in '/' Application.

Compilation Error

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: CS0433: The type 'ASP.formscontrols_worker_it_ascx' exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\eda066a2\8bd7b761\App_Web_5w8zybux.dll' and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\eda066a2\8bd7b761\App_Web_worker_it.ascx.fd9ce2d7.k5uteqwr.dll'

 

The problem happens both, when I'm starting in debug-mode or without debug-mode. The error message is actually true, the control exists in both of the dll's. The strange thing however is first that the error doesn't happen every time I compile and run the project and moreover it doesn't happen on any other PC of my team colleagues.

Can someone give me a hint of what I could do to avoid the problem? Often a clean and rebuild of the solution helps, but not always Sad

Thanks for any help, since the problem is really disturbing me!!
 


http://blog.js-development.com
0
kito
5/21/2008 2:19:49 PM
asp.net.vs2005-webapp-projects 1239 articles. 0 followers. Follow

5 Replies
829 Views

Similar Articles

[PageSpeed] 49

Hi,

Please try to close your solution and delete the subfolder of 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files', and then rebuild your website.

You also can try to copy your website files to new clean project.

 


I hope this helps.


Thomas Sun
Microsoft Online Community Support

Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.
0
Thomas
5/23/2008 7:47:40 AM

Hi,

that's actually what I'm doing all the time. Just two minutes ago the compiler error showed up again. I then usually first try to just to a full rebuild of the solution. Often that already solves it, if not, I terminate the VS Development server, I do a clean of the solution, I clean the subfolders of the Temporary ASP.NET files and then I do a rebuild of the solution. Normally it works then, but not always. If it still doesn't work, I close VS and repeat all the steps of deleting the Temporary ASP.NET subfolders etc...

The problem is just that this error appears on average 5-8 times during a day and it costs a lot of time, so I wanted to try to identify the root of the problem and not just a workaround.
Could it be a computer-speed problem, meaning could a slow hard-drive cause it? I don't know why, but I have the feeling that certain files may be blocked during compilation and therefore things are compiled again in separate dll's...but as I said, it's just a feeling...
 


http://blog.js-development.com
0
kito
5/23/2008 8:02:56 AM

Hi,

Thanks for your response.

If two different assemblies referenced in your application contain the same namespace and type, the compiler will throw this exception.

Please make sure that there is not multiple Pages or User Controls which have same namespace or class.

For more information, see http://blogs.msdn.com/carloc/archive/2007/06/12/compiler-error-message-cs0433-in-asp-net-2-0.aspx

 

I hope this helps.


Thomas Sun
Microsoft Online Community Support

Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.
0
Thomas
5/26/2008 2:43:37 AM

Hi, thanks for the link and the information.
I've already checked before that there is no multiple page or user control in the same namespace or with the same class because that was also what I expected to be the problem. There isn't however any such problem. I already used the "Reflector" from Lutz Roeder and there are actually two dll's of the same type, so the compiler error is ok. My main problem is that there is no clear scheme when the error pops up. Often I work a whole afternoon without any error message and then there are days where it pops up on every start of the application. Or for instance the compiler error may appear on the first build and if I do a rebuild just immediately after the error popped up, everything may work fine. Therefore I'm no able to understand how to avoid the problem and furthermore - as already mentioned - my team colleagues work on the same code base and they have no such problems.

 


http://blog.js-development.com
0
kito
5/27/2008 6:46:39 AM

The problem is solved!!
I'm posting the URL to my blog since I've already written a post there: http://blog.js-development.com/2008/06/type-x-exists-in-both.html


http://blog.js-development.com
0
kito
6/18/2008 6:51:09 AM
Reply:

Similar Artilces:

''''''''''''''''''''
Name: haznen Email: haznenatyahoodotcom Product: Gran Paradiso Alpha 8 Summary: '''''''''''''''''''' Comments: '''''''''''''''''''''''''''''''''''' Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20061204 UGES/1.7.2.0 GranParadiso/3.0a1 From URL: http://www.mozilla.org/projects/granparadiso/ Note to readers: Hendrix gives...

'''''
Name: mario Email: ramar17atfastwebnetdotit Product: Gran Paradiso Alpha 2 Summary: ''''' Comments: K: Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2) Gecko/20070206 GranParadiso/3.0a2 ...

Occaisonal Build problems (type 'xxx' exists in both 'yyy.dll' and 'xxx.dll')?
Hello: Been working with Express for about 2 months now -- and it generally works fine -- but I occaisonally get this error message when I rebuild projects to rerun it: ------ Rebuild All started: Project: http://localhost/TestIV/, Configuration: Debug .NET ------ Build Web Beginning D:\DEV\DEV_NET\CS\SITES\TestIV\portal.aspx(9,31): error CS0433: The type 'ASP.Portal' exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.40607\Temporary ASP.NET Files\testiv\2bc5e680\fdf16dd9\f3iai7un.dll' and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.40607\Temporary ASP.NET Files\testiv\...

Cast from type ''''DBNull'''' to type ''''String'''' is not valid.
How do I avoid getting this error: Cast from type ''''DBNull'''' to type ''''String'''' is not valid. I am trying to get values from the database into a form for updating using a Datareader, SQL is set to allow nulls for certain fields as they are not required but the only way I can get the form to display is by adding a space in SQL. Is there another way around this? Check if it is equal to DBNull.Value first and if it is, don't do the cast.Stanley Tan theSpoke Blog Where in the code does it need to go? I am using the following and it's the profile that isn't always requi...

Error 43 The type 'Controls_XX' exists in both '..\App_Web_blah1.dll' and '..\App_Web_blah2.dll'
When I try to publish my website I keep getting these errors which relate to various conflicts present in subdirectories at c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ The problem always relates to a particulate User Control : 'Controls_PgHeader', which is just about the only control which is modified from one compilation to the next. Other than manually deleting the files which are in conflict, what is the solution and source of this problem? Here is a sample error message: Error 43 The type 'Controls_PgHeader' exists in bot...

The type '<class>' exists in both '<dll location>' and '<dll location 2>'
Hi. Has anyone come across this problem upgrading VS2003 to VS2005:The type '<class>' exists in both '<dll location>' and '<dll location 2>' Thanks! Hi TinaFMills,   Did you finish the process of migrate project form 2003 to 2005?   The error message means duplicate class name in different locations. Such as aspx pages, user controls, custom controls and so on. Please load the solution in Visual Studio IDE try to find the duplicate class. Edit->File and Replace->Find In Files (look in entire solution)    Sincerely,Benson YuMicrosoft Online...

The type '<class>' exists in both '<dll location>' and '<dll location 2>'
For some reason though it appears that one of my class files (_common.cs - in the App_Code directory) is being included in the WAP .dll file as well as when it compiles the App_Code at runtime.error CS0433: The type 'inlinehockey._common' exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\25321638\9b5c4b00\assembly\dl3\3657f4e6\cd91aef5_4d5cc601\inlinehockey.DLL' and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\25321638\9b5c4b00\App_Code.xad_ajc1.dll'  The error was not knowing what dll to use for the type w...

'do' won't 'do' if '/'
Greetings to All from Au, Have a NetWare Perl 5.8.4 and wanted to tweak File\Spec\NW.pm to try and standardise on '/' separators. If I run a test script (t/uni/lower.t) with an unmodified NW.pm, it calls t/uni/case.pl, that, in case.pl, (when the path separators are '\'), the $file is '..\lib\unicore\To\Lower.pl' and the following code portion works, with $simple getting a returned table: sub casetest { my ($base, $spec, $func) = @_; my $file = File::Spec->catfile(File::Spec->catdir(File::Spec->updir, "lib", &qu...

'''
Name: L Lachowsky Email: e2brutus_10atyahoodotcom Product: Firefox Summary: ''' Comments: why duddn this surprise me... I change default server from IE to Mozilla, and then i get error messages. well, shud I decide to not get on my computer with Mozilla..or shud I risk security breeches with IE....hmmm at least i can get on the internet with IE Browser Details: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5 From URL: http://hendrix.mozilla.org/ Note to readers: Hendrix gives no expectation of a response to this fee...

Unable to find an entry point named 'Add' in DLL 'CPPDLL.dll'. while running a c#.net web application
  I have created a small web application using c#.net that calls a function from a dll file created in c++ the following are the files that i have used to create a dll file.. //CPPDLL.cpp file #include “stdafx.h” #include “CPPDLL.h” #include using namespace std; namespace CPPDLL { double Class1::Add(double a, double b) { return a + b; } } //CPPDLL.h file #pragma once using namespace System; namespace CPPDLL { public class Class1 { // TODO: Add your methods for this class here. public: static __declspec(dllexport) double Add(double a...

'b'..'a'
Hello. I'm using defferent 5.6.0's for Win32. I wonder wheter following behaviour is intentional or not: d:\>perl -e "print 'b'..'c'" bc d:\>perl -e "print 'b'..'a'" bcdefghijklmnopqrstuvwxyz I expected empty list in latter case, like in perl -e "print 'bb'..'a'" <!ENTITY Vadim REALLIFE "Vadim V.Konovalov, St.Petersburg, Russia"> &Vadim; On Wed, Sep 20, 2000 at 03:14:41PM +0400, Konovalov, Vadim wrote: > Hello. > > I'm using defferent 5.6.0'...

'or' or 'union'
Hello I was just wondering, in general what is better to use, an 'or' clause in a select or a 'union' to join two selects together. Do both statements create work tables? Many thanks Alex I think OR will be better than union. because suppose u have 3 tables and using OR u can join table a and table b and table c so each table will have only one read. but using union you will join table a and table b and in another query of union u will use table (a or b) and table c so ur one read is more in union . Ramdas Alex Cheung wrote: > Hello > >...

'IN' Clause or 'OR'
Hello, [1]: select * from TABLEA where COL1 IN('value1','value2''valu3'....) [2]:select * from TABLEA where COL1 = 'value1' OR COL1= 'value2' OR COL1='valu3'. TABLEA is a huge table and it has non-clustered index on COL1. Among the above 2 queries, which query will give me the better performance or fast response and WHY? What is the difference between 'IN' and 'OR' clauses as for as Sybase Optimization is concerned. Which is the better one to be used on huge tables. Thanks. Mac An IN list is treated ...

INSTALL 'freetyp6.dll' and 'fntcfg2.dll' i
Where can I download these as non yum/rum versions? TIA -- Regards Dave Saville On 03/10/15 11:08 AM, Dave Saville wrote: > Where can I download these as non yum/rum versions? > > TIA > http://rpm.netlabs.org/release/00/zip/ contains all the zip files that have been packaged as zip files. Don't forget about libpng-1_6_16-1_oc00.zip, urpo.dll which needs to be the latest and may have not been packaged and possibly z, bzip, and xv libraries, I haven't tried the newest but Bitwise seems to want to have as many dependencies as possible. Dave ps GCC1.d...

Web resources about - Problem: The type 'typename' exists in both 'dll-name-1' and 'dll-name-2' - asp.net.vs2005-webapp-projects

Resources last updated: 11/29/2015 2:43:32 PM