aspnet_compiler CS0436

After manual migration of a VS2008 Web Site Project to a Web Application Project, the aspnet_compiler would display hundreds of warnings of the type

c:\Users\[user]\AppData\Local\Temp\Temporary ASP.NET Files\[webproject]\be406d28\f38d

warning CS0436:

The type ‘type’ in ‘assembly’ conflicts with the imported type ‘type2’ in ‘assembly’. Using the type defined in ‘assembly’.

Der Typ “Typ” in “Assembly” verursacht einen Konflikt mit dem importierten Typ “Typ2” in “Assembly”. Der in “Assembly” definierte Typ wird verwendet.

What is called ‘assembly’ in the MSDN article is really the C# source file.

Apparently the problem was caused by a minor oversight:

I forgot to replace the pages’ CodeFile attribute with the CodeBehind attribute.

The last paragraph of this blog on a similar compiler warning pointed me to the right direction.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: