小编rjg*_*234的帖子

发布ASP .NET MVC项目时"无法找到类型或命名空间名称"

我是C#ASP .NET MVC的新手,所以我不太确定很多事情.但是我在我的新公司继承了这个项目,我只是想构建我在这里开始时接管的计算机上存储的文件.我很确定没有人触及这些文件,因为最后一个人离开了,所以我认为代码应该没有问题,因为该网站现在正在运行并正常工作.

但是当我尝试将这些文件发布到临时站点(出于测试目的)时,我得到了一堆相同的错误(取出了错误中给出的完整路径),并且项目无法发布.

    Error   77  The type or namespace name 'Controller' could not be found (are you missing a using directive or an assembly reference?)    \Controllers\AccountController.cs   15  38  Project
Error   99  The type or namespace name 'HttpGetAttribute' could not be found (are you missing a using directive or an assembly reference?)  \Controllers\AccountController.cs   17  10  Project
Error   100 The type or namespace name 'HttpGet' could not be found (are you missing a using directive or an assembly reference?)   \Controllers\AccountController.cs   17 …
Run Code Online (Sandbox Code Playgroud)

c# asp.net asp.net-mvc compiler-errors visual-studio-2010

1
推荐指数
1
解决办法
3万
查看次数