编译器错误信息:CS0433 [英] Compiler Error Message: CS0433

查看:1001
本文介绍了编译器错误信息:CS0433的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将与一个奇特的错误信息(我是一个初学者,建立一个网站在ASP.NET中使用C#,其中发现错误的文件是一个的.ascx =用户控件文件)突然启动

编译器错误信息:CS0433:类型'链接'在这两个存在
'... \\临时ASP.NET文件\\ ROOT \\ 901650e7 \\ 5e27d040 \\ APP_ code.ybv-vo7n.dll和
'... \\临时ASP.NET文件\\ ROOT \\ 901650e7 \\ 5e27d040 \\装配\\ DL3 \\ f6cf02ac \\ a93eed1d_ab32cd01 \\ Project1C.DLL

10号线显然是在那里该错误(用红色的字)茎。您能否给一些指点?我无法知道从哪里开始寻找/固定。谢谢!

  9号线:其中,ItemTemplate中>
10号线:LT; ASP:超链接ID =HyperLink1=服务器
11号线:NavigateUrl ='<%#Link.ToFilms%GT(EVAL(FilmsID)的ToString());
第12行:文本='<%#HttpUtility.HtmlEn code(EVAL(Nume)的ToString())%GT;'


解决方案

我知道这是一个有点晚了一个答案,但可能是一些帮助别人。

问题:
也有类似的问题,这样的场景:


  • VS2010 WebAppProject(不WebSiteProject)

  • 曾在APP_ code一些孤立类(与地产[生成操作]设置为[编译])

  • 成功生成,但加载在浏览器中的Web应用程序时,它抛出编译错误CS0433:类型'的 Namespace.Classname 的'存在于两个C:\\ WINDOWS \\ Microsoft.NET \\框架\\ v4.0.30319 \\临时ASP.NET文件\\ ROOT \\ 7e10b43d \\ 77c16432 \\ APP_ code.itpfsoon.dll'和'C:\\ WINDOWS \\ Microsoft.NET \\框架\\ v4.0.30319 \\临时ASP.NET文件\\根\\ 7e10b43d \\ 77c16432 \\装配\\ DL3 \\ 2055583c \\ 0bc450de_1589ce01 \\ WebAppName 的.DLL

解决方案:
把孤立的类需要属性[生成操作]设置为[编译]比APP_ code以外的任何文件夹,因为APP_ code文件夹将被编译为一个单独的组件,具有2组件编译同一类(在 APP_ code Web应用程序,其中包括来自APP_ code本身所有code)。

参考:
<一href=\"http://vishaljoshi.blogspot.com/2009/07/app$c$c-folder-doesnt-work-with-web.html\">http://vishaljoshi.blogspot.com/2009/07/app$c$c-folder-doesnt-work-with-web.html

I will start abruptly with a peculiar error message (I'm a beginner, building a website in ASP.NET with C#, the file where the error was found is a .ascx = user control file):

Compiler Error Message: CS0433: The type 'Link' exists in both '...\Temporary ASP.NET Files\root\901650e7\5e27d040\App_Code.ybv-vo7n.dll' and '...\Temporary ASP.NET Files\root\901650e7\5e27d040\assembly\dl3\f6cf02ac\a93eed1d_ab32cd01\Project1C.DLL'

Line 10 is apparently where the error stems from (colored in red). Can you give a few pointers? I'm having trouble knowing where to start looking/fixing. Thank you!

Line 9:<ItemTemplate>
Line 10:<asp:HyperLink ID="HyperLink1" runat="server" 
Line 11:NavigateUrl='<%# Link.ToFilms(Eval("FilmsID").ToString()) %>'
Line 12:Text='<%# HttpUtility.HtmlEncode(Eval("Nume").ToString()) %>'

解决方案

I know it is a bit late for an answer, but might be of some help to someone else.

Issue: Had a similar problem with this scenario:

  • VS2010 WebAppProject (not WebSiteProject)
  • Had some isolated classes in App_Code (with property [Build Action] set to [Compile])
  • Builds successfully but when loading the web app in the browser, it throws Compilation Error CS0433: The type 'Namespace.Classname' exists in both 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\7e10b43d\77c16432\App_Code.itpfsoon.dll' and 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\7e10b43d\77c16432\assembly\dl3\2055583c\0bc450de_1589ce01\ WebAppName.DLL'

Solution: Put isolated classes which require property [Build Action] set as [Compile] to any folder other than App_Code since the App_Code folder will be compiled as a separate assembly, having the same Class compiled in 2 assemblies (the App_Code and the WebApp which includes all code from the App_Code itself).

Reference: http://vishaljoshi.blogspot.com/2009/07/appcode-folder-doesnt-work-with-web.html

这篇关于编译器错误信息:CS0433的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆