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.
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.
Follow @debug_mode
Leave a Reply