locked
Problem adding light_generic.xaml to blank metro style c++ app RRS feed

  • Question

  • I'm trying to add light_generic.xaml to my app, but the build fails with the following error message:

    C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v1.0\Microsoft.Windows.UI.Xaml.Common.targets(208,9): error MSB3021: Unable to copy file "Debug\light_generic.xaml" to "c:\users\jani9000\documents\visual studio 11\Projects\Application6\Debug\Application6\light_generic.xaml". Could not find file 'Debug\light_generic.xaml'.

    The problem can be reproduced by creating a new simple c++ app. Steps:

    1. in VS2011 developer preview file > new... > Visual C++ > Windows Metro Style > Application > OK
    2. copy light_generic.xaml to same folder where your App.xaml resides
    3. drag light_generic.xaml to project
    4. check that VS has added light_generic.xaml to App.xaml ResourceDictionary, save App.xaml
    5. build solution

    Wednesday, February 8, 2012 1:09 AM

All replies

  • VS2011 can't find the xaml file in your debug folder. Please copy light_generic.xaml file to your debug folder manually and compile it again.

    Thanks!

    Best Regards,

    Han Xia

    Wednesday, February 8, 2012 3:25 AM
    Moderator
  • Right, well, I figured as much.. But since VS automatically adds the xaml to the App.xaml's ResourceDictionary, shouldn't it also take care of integrating the file to the rest of the build chain?

    Wednesday, February 8, 2012 6:58 PM