找不到类型或命名空间 [英] Type or Namespace not found

查看:94
本文介绍了找不到类型或命名空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

描述:在编译满足该请求所需的资源期间发生错误.请查看以下特定的错误详细信息,并适当地修改您的源代码.

编译器错误消息:CS0246: The type or namespace name ''Lead'' could not be found (are you missing a using directive or an assembly reference?)

源错误:

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0246: The type or namespace name ''Lead'' could not be found (are you missing a using directive or an assembly reference?)

Source Error:

public string BuildEmail(string EmailType, Lead lead, FollowUp followup)
{
StringBuilder email = new StringBuilder();



在iis中部署我的应用程序时出现上述错误.在本地工作正常.有人可以帮忙吗?

Lead是肯定存在的类型.我已经阅读了一些有关可能的框架版本问题的内容,但不确定从哪里开始.



Getting the above error when deploying my app in iis. Works fine locally. Can anyone help?

Lead is a type that definitely exist. I have read some things about possibly framework version issues but not sure where to begin.

推荐答案

可以验证哪个CS文件中包含Lead类吗?

如果是这样,请检查该类的名称空间,并在访问该名称空间的页面顶部添加一个"using"和该名称空间.

如果它是一个Web应用程序项目,请确保构建"应用程序并将bin目录中的文件移动到生产服务器.
Can you verify which cs file has the class Lead in it?

If so, check the namespace of that class and include a "using" with that namespace at the top of the page accessing it.

If it is a web application project, make sure you "build" your application and move the files within the bin directory to the production server.


这篇关于找不到类型或命名空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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