Asp.net - The type or namespace name 'App_Code' does not exist in the namespace 'xxx' (are you missing an assembly reference?)

  我在 项目 下面创建一个 App_Code的文件夹,然后在其下创建自定义的类,但是当我在该项目下别的地方使用时报错:

The type or namespace name ‘App_Code‘ does not exist in the namespace ‘xxx‘ (are you missing an assembly reference?)

  解决方案:

    1,在创建的类上右键,选择 Properties,如图:

  2,将 Build Action 属性设置为 Compile,如图:

即可.

Asp.net - The type or namespace name 'App_Code' does not exist in the namespace 'xxx' (are you missing an assembly reference?)

时间: 2024-08-03 18:57:51

Asp.net - The type or namespace name 'App_Code' does not exist in the namespace 'xxx' (are you missing an assembly reference?)的相关文章

The type or namespace name 'Script' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)

应该说是 .net4 的bug,没有所谓的 System.Web.Extensions.dll 库文件,需要将项目的 Target Framework修改为 3.5版本,才能加载System.Web.Extensions.dll库文件. 我在使用 System.Web.Script.Serialization.JavaScriptSerializer 类解析嵌套的json时)用到. The type or namespace name 'Script' does not exist in the

The type or namespace name 'Html' does not exist in the namespace 'System.Web.Mvc' (are you missing an assembly reference?)

The type or namespace name 'Html' does not exist in the namespace 'System.Web.Mvc' (are you missing an assembly reference?) solution: right click on reference system.web.mvc, toggle "Copy local" to "true". The type or namespace name 'H

The type or namespace name 'Description' does not exist in the namespace 'System.Web.Http'

Visual Studio 2012 SPA Template /Help/index.cshtml file was throwing your error. @using System.Web.Http @using System.Web.Http.Description <=== CS0234: The type or namespace name 'Description' does not exist in the namespace 'System.Web.Http' (are yo

(XAML)&quot;XXXX&quot; does not exist in the namespace &quot;clr-

Error 139 Assembly 'System.Activities.Core.Presentation' was not found. Verify that you are not missing an assembly reference. Also, verify that your project and all referenced assemblies have been built. EnumerationTestDesigner.xaml 6 17 LoganTestsE

The type or namespace name &#39;****&#39; could not be found (are you missing a using directive or an assembly reference

错误的提升内容: 具体情况: 本人出现这种问题的情况是这样的,本人解决方案的主.exe项目的目标框架情况如下: 而,该项目所依赖的附加类库项目的目标框架为 4.5. 造成在.exe项目中,无法识别所引用的类库,而出现下图左所示的黄色三角形标志.此外,该DBFSR类库的属性信息也无法识别.   , 解决方案: 将类库项目DBFSR的目标框架设置为与.exe目标框架一致的版本 4.5即可.重新编译该类库后,该类库的属性信息也便可以查看了(如上图右所示). 参考文章 菜鸟写给菜鸟——The type

ASP.NET项目中,无法引用App_Code中的类

ASP.NET项目中,无法引用App_Code中的类 最近在做Walmart的项目,其中一个付款系统是ASP.NET编写的.遇到一个问题就是无法引用App_Code中的类. 而且在后台代码中编写代码时,也没有智能提示.生成解决方案时会报错:对应的名称空间或类型不存在或找不到. 解决办法就是选中相应类文件,在属性中设置"生成操作"(Build Action),从内容(Content)修改为编译(Compile).

The tag &#39;ChartPlotter&#39; does not exist in XML namespace

本地build的时候每次都是OK的,但是Shelveset到Server上build的时候,总是出错. 果断google/bing了几个建议,无果. 不得不重新仔细的看server上的building log,然后发现, Considered "..\ExternalDrops\DynamicDataDisplay.dll", but it didn't exist. 晕菜,原来这些文件并没有被加入到server上. 查了一下,还有其他的文件也没有被加入,在“Source Contro

react-native run-android Starting: Intent Error type 3 Error: Activity class does not exist

使用"react-native run-android"命令运行android应用时,如果常常出现如下错误: Starting the app (/home/xxx/soft/sdk//platform-tools/adb shell am start -n xxx/.MainActivity)- Starting: Intent { cmp=xxx/.MainActivity } Error type 3 Error: Activity class {xxx/xxx.MainActi

asp.net mvc4 设置build项目时,编译view页面

新建好项目后,把system.web.mvc.dll移除,重新选择本地C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 4\Assemblies下的system.web.mvc.dll,编译出现问题提示:“The type or namespace name 'Html' does not exist in the namespace 'System.Web.Mvc'” 切换回来对应新建时应用目录下的system.web.mvc.dll依然