简体   繁体   中英

Visual Studio 2012 cannot open XAML project due to missing XAML files

I am getting the following Visual Studio 2012 error after upgrading to Windows 8.1 when I try to open any Windows 8 store app using XAML/C#:

文件丢失

The imported project "...\\MSBuild\\Microsoft\\WindowsXaml\\v11.0\\Microsoft.Windows.UI.XAML.CSharp.targets" was not found. Confirm that the path in the declaration is correct, and the file exists on disk.

I do not have a WindowsXaml folder in \\MSBuild\\Microsoft. I also have just done a clean install of VS2012 and an upgrade to Windows 8.1 as before this I was getting the following error (one of many, but this was the prevalent one) with Windows 8 and XAML designer: Argument null exception , if there is any chance that could be related.

I have also viewed the following threads and added the VisualStudioVersion environment variable, which has not helped.

So ideally I am looking for a solution that will just allow me to open a Windows 8 store app in Visual Studio 2012 running Windows 8.1 as you would expect it to work.

I cannot use Visual Studio 2013 for this as the Windows 8 labs at university (for which I am trying to do this) will be up and running soon and they use Visual Studio 2012, and that is where my team will need to continue working on this project.

The problem appears to have been caused by re-installing VS2012 on my SSD rather than my HDD (which I did to try and remedy my first error, which is back). The missing folder, WindowsXaml, was present in MSBuild on my HDD, B:\\, but not on the SSD, C:\\, for whatever reason the installation process did not pick up on this. This issue is now resolved.

I am now back to the previous XAML designer error that I had in the first place, "System.ArgumentNullException Value cannot be null. Parameter name: key".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM