Pre-compilation error in asp.net?
When I run my web applicatin it is giving this compilation error..
CS0433: The type 'BusinessLayer.Vide开发者_运维百科os' exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\888033a8\963ffe48\App_Code.zsu4f9h7.dll' and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\888033a8\963ffe48\assembly\dl3\5f298b28\bc3d2b1f_0c98ca01\BusinessLayer.DLL'
Line 36: static string VideoId; Line 37: public int count; Line 38: Videos obj = new Videos(); Line 39: TopRated clsTopratedBL = new TopRated(); Line 40: protected void Page_Load(object sender, EventArgs e)
Can you help me?
From the error message, it looks like you're working with a Web Application rather than a Web Site. This means that you can't have a folder called "App_Code" as it'll be handled incorrectly. You need to rename the folder and rebuild your site. Pretty much any other name will do.
Rename it to "ApplicationCode" and the problem should go away.
If you are using a Web Application Project then get rid of the special App_Code
folder and put your code in normal folders.
精彩评论