3
votes

I am trying to run the samples from here: https://github.com/Microsoft/Windows-universal-samples/tree/dev/Samples on Visual Studio 2015 Professional. However, when I try to load the project CameraFrames.csproj, I am getting the following error:

"The imported project "C:\Program Files (x86)\Windows Kits\10\bin\10.014332.0\XamlCompiler\Microsoft.Windows>UI.Xaml.Common.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v14.0\8.21\Microsoft.Windows.UI.Xaml.Common.targets"

The 2nd file does exist on my system, but the first does not. I tried editing my CameraFrames.csproj file and added the file that DOES exist on my system. but this did not work. (See below) 1st change: <Content Include="C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v14.0\8.21\Microsoft.Windows.UI.Xaml.Common.Targets"> </Content> 2nd change: (after deleting the first change) <Reference Include= "Microsoft.Windows.UI.Xaml.Common"> <HintPath> C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v14.0\8.21\Microsoft.Windows.UI.Xaml.Common.Targets </HintPath> </Reference>

Any ideas? I've been stuck on this problem for a long time. Thanks!

1
I am using Windows 8s123
This is bleeding edge stuff, both the SDK and the Win10 version are still in beta. Also rather questionable that it could work on Win8. Hard to see how the path got so corrupted, this needs to come from MSBuild instead of the SDK directory. It this could go anywhere then you'd have to checkout an older version.Hans Passant
Thanks so much for your answer. I will upgrade to Windows 10 now and give it a try.s123

1 Answers

3
votes

Please Repair Visual Studio and restart the PC. Problem will be resolved.

I was getting error: "Confirm that the path in the declaration is correct, and that the file exists on disk."

I faced same issue with Visual Studio 2015 , project .Net 4.6 version on Windows 8. Tried many things but finally repairing VS worked. :)