CS0433: The type 'ProfileCommon' exists in both

G

Guest

I've started getting this message after doing a publish of an Asp.Net 2.0
(c#) web site. The site uses a custom profile provider - I'm sure there is a
relation here, but I can't find it. Everything worked before, and the same
code is working on another site. I've gone as far as completely starting the
app over from scratch, and copying the working code for the other app into
this one. It will work for a few publishes, then just stop.

Compiler Error Message: CS0433: The type 'ProfileCommon' exists in both
'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\gn_p\f6309429\cfa5f75e\assembly\dl3\4ddc0a92\2ce3ec60_7583c601\App_Code.DLL'
and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\gn_p\f6309429\cfa5f75e\App_Code.z9v2fk16.dll'

Thanks,
Phil
 
G

Guest

Phil,
Try cleaning out the Temporary ASP.NET folder where these assemblies were
deposited. When you run the app again, it will regenerate the assembly - only
the one copy it needs.
Peter
 
G

Guest

Hello Peter,

Thanks for the reply.

I've tried cleaning out the temp files repeatedly. I've also tried creating
completely new projects. It's odd that it will publish successfully a few
times, then stop working. No changes to code need occur either. I can
simply republish and copy the publish version to the virtual directory
several times and the error will eventually show up.

Any other ideas?

Thanks again.

PS - I love the eggheadcafe site.
 
T

Tasos Vogiatzoglou

Do you declare the type in two different locations ? One in the
app_code folder and one ,maybe, via a reference ?

Tasos
 
G

Guest

Hello Tasos,

Thanks for the reply.

No, the type is just a class file in my App_Code folder. The only reference
is in the web.config file when setting up the profile configuration.

Thanks again.

Phil
 
G

Guest

Thanks for the reply.

Tried that, still didn't help. So, what I did next was to completely remove
the app/site. I removed the source and published versions; removed the temp
files; removed everything I could find related to the site. Then I started a
new site and used the default AspNet providers for authentication, membership
and profiles - I didn't use my custom provider at all. The site had one
..aspx page (default.aspx), and basic web.config - with just the connection
string and provider information.

Site runs fine in source mode, but publish it and copy the published version
to a virtual directory and I'm back to the same error. So, at least I know
it's not my custom provider, as the default AspNet provider is exhibiting the
same thing.

I'm pretty much at a loss now, if even a generic site does this.

Thanks again.
 
G

Guest

I uninstalled ReSharper (just in case)... no help
I did a repair/reinstall of VS 2005... no help

I'm down to a web site with only a default.aspx and a web.config. I still
get the same error after publishing. However, I've discovered that if I
remove any properties from the web.config I will not receive and error. I
don't even have to publish again, and I can leave the property tags. I just
have to remove the add tag, save the config and refresh the page and it works.

Any ideas on that?

Thanks,
 
Joined
Aug 3, 2008
Messages
1
Reaction score
0
we had the same problem with our website. The problem is that you might be having pages and controls having same names. The resolution is to rename your aspx pages to different name so that it doesnt confilict withe the names of the ascx controls
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top