无法使用App_Code类 [英] Cannot use App_Code class

查看:140
本文介绍了无法使用App_Code类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨我正在使用Web应用程序

我在App_code文件夹中添加了我的类,但是当我构建时,出现错误类型与导入类型冲突< br $> b $ b

此处图片



我尝试过清洁,然后重新建造,但没有工作



是否有人发布?

Hi im workin ina Web Application
I added my classes in App_code folder, but when I build, an error appears "the type conflicts with the imported type"

image here

I tried cleaning and then building again but didnt work

Does someon has tis issure?

推荐答案

See a source file in the App_Code special folder, and some in-page code-behind where the same type (WeekOVervew) is defined. If these types do different things then they should be named aptly, resolving the error, if these types do the same thing then you should only have one copy, also resolving the error.

Remove or correct the duplicate type.


您好,



请通过以下链接查看您的解决方案。



App_Code文件夹不适用于Web应用程序项目(WAP) [ ^ ]


感谢大家。我为什么会出现这个问题。是因为在项目中构建并引用了一个dll,这就是错误原因。但是现在我的app_code上的课程并没有认出我的aspx.cs课程





这里有一张图片



我在所有app_code类中添加了相同的命名空间



PD:我的项目是Web应用程序而不是WebSite

谢谢
Thanks for everyone. I foud why appears that issure. Is because a dll was build and referenced in the project, that why the error. But now my classes from app_code, doesnt recognice my aspx.cs class


Here an image

I added the same namespace in all app_code classes

PD: my project is a Web Application not WebSite
Thanks


这篇关于无法使用App_Code类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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