Migrate HTML5 WinJS Metro Application project to VS2012

In this post we will migrate a Metro Project created in HTML5 and WinJS from VS11 to VS2012 RC.

Recently I upgraded my system to Windows 8 Release Preview. After upgrading Windows, I migrated VS to VS2012 RC. After successful installation of VS2012, I tried opening a HTML5 + WinJS project created in VS11. When I tried to build that project, I got below exception.


Exception was in file C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets

To remove this error what all you need to do is go to solution and remove old reference of Microsoft.WinJS


And then again try to rebuild the solution. You should not be getting any build error. Though after than if you run the project you will be getting errors like


This error implies that reference has been missing. To solve this we need to add new reference in the project. Add Windows Library for JavaScript 1.0 RC reference in the project. image

After adding reference you need to change the references on HTML. Currently your reference may look like as following


You need to change Microsoft.WinJS.0.6 to Microsoft.WinJS.1.0.RC. After changing references should look like as following


No go ahead and run the project. You should be not getting any error. In this way you can migrate HTML5 WinJS Metro project to VS2012.

I hope this post is useful. Thanks for reading.

4 responses to “Migrate HTML5 WinJS Metro Application project to VS2012”

  1. […] Migrate HTML5 WinJS Metro Application project to VS2012 (Dhananjay Kumar) […]

  2. […] Migrate HTML5 WinJS Metro Application project to VS2012 and Detect Internet connection in HTML5 and Saving and Retrieving JavaScript object in HTMl5 Local Storage (Dhananjay Kumar) […]

  3. very useful tips…. thank you very much

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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

Create a website or blog at WordPress.com