我有一个 MVC3 C# .Net Web 应用程序,我在我的应用程序上运行 aspnet_compiler 以进行预编译。我正在运行这个命令:
aspnet_compiler -v /dev/boe
Boe 是“默认网站”下开发结构中的应用程序。上面的命令产生了这个错误。
c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dev_boe\25d5f53a\2ad742fc\App_Web_vujir5mm.0.cs(29): error CS0234: The type or namespace name 'Models' does not exist in the namespace 'BOE' (are you missing an assembly reference?)
c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dev_boe\25d5f53a\2ad742fc\App_Web_vujir5mm.2.cs(29): error CS0234: The type or namespace name 'Models' does not exist in the namespace 'BOE' (are you missing an assembly reference?)
c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dev_boe\25d5f53a\2ad742fc\App_Web_vujir5mm.3.cs(29): error CS0234: The type or namespace name 'Models' does not exist in the namespace 'BOE' (are you missing an assembly reference?)
但是,模型不在我们的解决方案中。我们的模型对象位于我们的 Web 应用程序引用的域项目中。看来编译器期望在我们的 MVC 应用程序中有一个模型引用。这是真的?还是有其他原因导致此错误?