ASP.NET MVC Mobile ViewEngines Available on Nuget

Lately, I’ve been spending my spare time helping with Nerd Dinner open source project. The other day Scott Hanselman annouced the latest release of Nerd Dinner, one of the fixes he mention was as fixing a release-mode caching bug that was introduced a few years back.

Also, Phil Haack published the ASP.NET MVC 4 Roadmap, one of the announced improvements was better mobile application support.

So I set out to 1) fix the caching issue and 2) provide the type of mobile application support to ASP.NET MVC 3 applications that was announced for ASP.NET MVC 4. The result was the Mobile View Engines and Sample NuGet packages.


The package provides the source files necessary to render .Mobile ASPX and Razor views for both C# and VB.NET projects. NOTE: These are replacements for the existing Razor and WebForm ViewEngines.

Here’s what the solution looks like after the Mobile View Engines Sample package has been added via NuGet:


Granted, not all of these files are necessary, depending on which language or ViewEngines you use in your project, but I’ve left it up to you dear reader to remove those files that your find unnecessary based on your situation.

The Nerd Dinner project uses the same techniques provided by these MobileCapableViewEngines along with browser detection by and jQuery Mobile to provide rich context to mobile devices.

I encourage you to give Mobile View Engines a try and let me know how you’d make it better!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s