开发者

TagBuilder gone from MVC 3 beta to RC

What happened to the TagBuilder class between ASP.NET MVC 3 beta and RC?

When compiling my project I get the error:

The type name 'TagBuilder' could not be found. This type has been forwarded to assembly 'System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Consider adding a reference to that assembly.

Howeve开发者_开发知识库r that assembly does not exist in the GAC (nor in the .NET tab of the Add References dialog.) A search of my HDD doesn't turn up a DLL with that name either.


On my install of the RC, that assembly lives here:

C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\Assemblies\System.Web.WebPages.dll


It was moved to the System.Web.Pages.dll assembly:

c:\Program Files\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\Assemblies\


FYI: C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\Assemblies\System.Web.WebPages.dll

is where it got installed by default on my Windows 7 Ultimate Box


In Visual Studio 2012, I added this reference by going to the Reference Manager for the project (right click on References in the project and select Add Reference). Filtering by Assemblies and then Extensions (that is the important part), and adding System.Web.WebPages.


In VS 2010 SP1, Microsoft added a new feature to copy these assemblies locally into your project (and source control). This way, the application can run on servers without needing to install MVCx. Right-click on the project, and choose "Add Deployable Dependencies..." and select the MVC checkbox. System.Web.WebPages will be pulled into your project.

Check out this article here that goes into more detail: Adding-mvc-dependencies-to-project

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜