Compilation Error: Type CS0433 Conflicts with Imported Type

This error has never occurred before. I read a lot about this, and I believe that some links in my soul cause conflicts. But I can not find it. There is no link called "WeekOverview". Only finds it in the App_Code folder.

I tried to clean, rebuild, the party and all. But, as I said, I think this is a link. But how do I get the right one?

Error posting

CS0433: The type 'WeekOverview' exists in both 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\personalwebb\75767f9d\62ef58be\assembly\dl3\b22616ea\c17e3cb3_f0ddcd01\App_Web_tzf1insv.DLL' and 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\personalwebb\75767f9d\62ef58be\assembly\dl3\26ecbd1c\01966db2_f0ddcd01\App_Code.DLL' 

Warning in visual studios

 The type 'WeekOverview' in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\website\ea888009\78e5b795\App_Web_jmrhajtx.5.cs' conflicts with the imported type 'WeekOverview' in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\website\ea888009\78e5b795\App_Code.cmrt8ckb.dll'. Using the type defined in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\website\ea888009\78e5b795\App_Web_jmrhajtx.5.cs'. c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\website\ea888009\78e5b795\App_Web_jmrhajtx.4.**cs 

Edit

My problem was that I had a WeekOverview app in App_Code and one .aspx page called WeekOverview. For soulve, either I should have gotten a namespace around my WeekOverview class. Or change the name in the class. Both worked, and I created a namespace.

+7
source share
2 answers

I believe that you have the source file in a special App_Code folder and some code inside the page where the same type is WeekOVervew ( WeekOVervew ). If these types do different things, they should be called exactly, resolving the error, if these types do the same, then you should have only one copy, also resolving the error.

Delete or correct the duplicate type.

+3
source

If this just happened, try removing the temporary asp.net files in the .net framework folder. If it returns, you have a problem with the links.

+3
source

All Articles