Home All Groups Group Topic Archive Search About

The type '_Default' conflicts with the imported type '_Default'

Author
15 Dec 2005 9:48 PM
Wayne Brantley
I get a warning when I build my web app in VS2005 RTM.   This error occurs
for every page that is called default.aspx.  (I have one in each folder of
my web application).

Pulling up the files it references, shows both files are code generated and
appear to be identical.  At the top of each file is
#pragma checksum [originalfilethisisfor.aspx] and they both refer to the
same file.

How do I get rid of this warning?

Warning 1 The type '_Default' in
'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\site\3f4ac539\1f8cc57b\App_Web_k46k7dwr.2.cs' conflicts with the
imported type '_Default' in
'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\miniter\3f4ac539\1f8cc57b\App_Web_0ilzep2v.dll'. Using the one in
'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\site\3f4ac539\1f8cc57b\App_Web_k46k7dwr.2.cs'.
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\site\3f4ac539\1f8cc57b\App_Web_k46k7dwr.2.cs 128

Author
15 Dec 2005 10:04 PM
tdavisjr
Wayne,

I think something went wrong here.  Are you converting a project from
asp.net 1.1 to 2.0 using VS 2005?

I just created the same senario and by default VS will pre-pend the
containing folder names before the page class name when it is declaring
the codebeside file.

E.g

FileName            CodeBeside Classname
-----------------------------------------------------------------------------------------

default.aspx  --> parital class _default

/subfolder1/default.aspx --> partial class subfolder1_default

/subfolder1/sub1/default.aspx  --> partial class
subfolder1_sub1_default

/subfolder2/default.aspx  -->  partial class subfolder2_default


So, this is the trend you will see going. However, if you are
converting a old project then I don't know if the conversion tool will
take care of this for you.

I hope this helps.
Are all your drivers up to date? click for free checkup

Author
16 Dec 2005 11:22 AM
Edwin Knoppert
I had the same, while default.aspx wasn't in the same folder (obviously :) )
VWD complaints about the (class)names.



Show quoteHide quote
"tdavisjr" <tdavi***@gmail.com> schreef in bericht
news:1134684265.125504.317940@g43g2000cwa.googlegroups.com...
> Wayne,
>
> I think something went wrong here.  Are you converting a project from
> asp.net 1.1 to 2.0 using VS 2005?
>
> I just created the same senario and by default VS will pre-pend the
> containing folder names before the page class name when it is declaring
> the codebeside file.
>
> E.g
>
> FileName            CodeBeside Classname
> -----------------------------------------------------------------------------------------
>
> default.aspx  --> parital class _default
>
> /subfolder1/default.aspx --> partial class subfolder1_default
>
> /subfolder1/sub1/default.aspx  --> partial class
> subfolder1_sub1_default
>
> /subfolder2/default.aspx  -->  partial class subfolder2_default
>
>
> So, this is the trend you will see going. However, if you are
> converting a old project then I don't know if the conversion tool will
> take care of this for you.
>
> I hope this helps.
>
Author
21 Dec 2005 12:41 AM
Wayne Brantley
Found it.  My master page was called defaut.master - the code behind was
named default!  So, I just renamed my codebehind class.  That will do it!

Show quoteHide quote
"Edwin Knoppert" <n***@hellobasic.com> wrote in message
news:43a2a3fb$0$10082$ba620dc5@text.nova.planet.nl...
>I had the same, while default.aspx wasn't in the same folder (obviously
>:) ) VWD complaints about the (class)names.
>
>
>
> "tdavisjr" <tdavi***@gmail.com> schreef in bericht
> news:1134684265.125504.317940@g43g2000cwa.googlegroups.com...
>> Wayne,
>>
>> I think something went wrong here.  Are you converting a project from
>> asp.net 1.1 to 2.0 using VS 2005?
>>
>> I just created the same senario and by default VS will pre-pend the
>> containing folder names before the page class name when it is declaring
>> the codebeside file.
>>
>> E.g
>>
>> FileName            CodeBeside Classname
>> -----------------------------------------------------------------------------------------
>>
>> default.aspx  --> parital class _default
>>
>> /subfolder1/default.aspx --> partial class subfolder1_default
>>
>> /subfolder1/sub1/default.aspx  --> partial class
>> subfolder1_sub1_default
>>
>> /subfolder2/default.aspx  -->  partial class subfolder2_default
>>
>>
>> So, this is the trend you will see going. However, if you are
>> converting a old project then I don't know if the conversion tool will
>> take care of this for you.
>>
>> I hope this helps.
>>
>
>

Bookmark and Share