To sum up all of the options for VS 2017, WebHelpers was installed by installing MVC in previous versions of Visual Studio. If you're getting this error, you probably don't have the older versions of VS installed anymore.
So, installing the Microsoft.AspNet.MVC
NuGet package will require Microsoft.AspNet.WebPages
and Microsoft.AspNet.Razor
, and the Microsoft.AspNet.WebPages
includes System.Web.Helpers.dll
.
If you've got direct references to System.Web.Mvc.dll and you don't want to use NuGet for MVC, you can get the Microsoft.AspNet.WebPages
NuGet, or there are some other NuGet packages that only contain System.Web.Helpers.dll
, like the microsoft-web-helpers
or System-Web-Helpers.dll
packages.
There appear to be 2 versions of System.Web.Helpers.dll
, one for .Net 4.0 and one for 4.5. Choosing the correct version of MVC or AspNet.WebPages will ensure you get the right one.