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.

image

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

image

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

image

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

clip_image002

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

clip_image004

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.

Advertisements

4 thoughts on “Migrate HTML5 WinJS Metro Application project to VS2012

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 )

Google+ photo

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

Connecting to %s