我有一个 ASP.NET MVC 2 网站(VS2010),我已升级到 ASP.NET MVC 3(VS2012),这在本地 IIS7 上运行良好,但是在发布它时,我在主机上得到了这个异常:
Could not load file or assembly 'System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
经过一番搜索后,我发现这表明我应该在某些引用(包括 System.Web.WebPages)上设置 CopyLocal 并且还使用 VS2012 中的发布工具,但这会产生以下异常?
Could not load file or assembly 'System.Web.WebPages.Deployment, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
而且我找不到任何部署 dll 来设置 copyLocal?
我怎么能解决这个问题?