我刚刚开始了一个用 MVC2 编写的旧项目......
只启动了少量的前端,所以我决定使用 MVC3 和 Razor 视图引擎。我创建了一个简单的控制器和视图,然后在 Cassini 中查看该站点,但它一直在告诉我:
Compilation Error
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 'WebMatrix' could not be found (are you missing a using directive or an assembly reference?)
Source Error:
Line 22: using System.Web.WebPages;
Line 23: using System.Web.WebPages.Html;
Line 24: using WebMatrix.Data;
Line 25: using WebMatrix.WebData;
Line 26:
Source File: c:\Users\XXXXXX\AppData\Local\Temp\Temporary ASP.NET Files\root\ecf08653\deea7194\App_Web_index.cshtml.e70a5900.x4np9ici.0.cs Line: 24
据我所知,WebMatrix 只是 IIS/Sql Server 和其他一些我不感兴趣的 gubbins 的捆绑包。我没有明确安装 WebMatrix(除非它捆绑在 MVC3 安装程序中,即使那样我也无法在我的硬盘上找到它)。
我已经完成了我的项目并删除了我可以找到的所有 WebMatrix 痕迹并清除了 ASP 临时文件,但它一直在抱怨,所以我想知道他们是否让 MVC 依赖于某些 Web 矩阵功能?