Upgrading Visual Studio "11" Developer Preview Metro Projects to Visual Studio "11" Beta Metro Projects
If you created Metro style (WinRT) projects in Visual Studio "11" Developer Preview (alpha) and you try to open them in the beta, you’ll have a few load issues. These are the ones I’ve found in my apps—it’s not exhaustive, but they seem to be the most common.
Projects will not load
The projects themselves will not load, with the following error:
The imported project "C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v1.0\Microsoft.Windows.UI.Xaml.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
To fix this, open the project file and navigate to the <Import> node. Change the path from v1.0 to v11.0 (see the highlighted extra 1 in the image below):
Compiler Directive
If you used the compiler directive WINRT, it has been changed to NETFX_CORE, so you’ll need to update your code.
Package fails to build
The package fails to build/deploy and complains about an InitialRotationPreference attribute. To solve this, open the Package.appxmanifest file and find the <VisualElements> node. You’ll find a line similar to this:
<VisualElements DisplayName="AtomicMVVM Metro Style App Demo" Logo="Images\Logo.png" SmallLogo="Images\SmallLogo.png" Description="AtomicMVVM Metro Style App Demo" ForegroundText="light" BackgroundColor="#000000" InitialRotationPreference="portrait" />
Remove the InitialRotationPreference attribute, so it ends like this:
<VisualElements DisplayName="AtomicMVVM Metro Style App Demo" Logo="Images\Logo.png" SmallLogo="Images\SmallLogo.png" Description="AtomicMVVM Metro Style App Demo" ForegroundText="light" BackgroundColor="#000000" />
Big load failure image from: http://www.hostedfile.com/pictures/76451/big-load-failure.html