WPF C# XML resources in subfolder not getting built -


currently in project directory have folder called "data" , in have 2 xml files use in wpf application. have set xml files "resource" , "copy output directory" option "copy always". however, following code throws directorynotfoundexception because files aren't being copied on bin\debug when build application.

return new game(xdocument.load("data/game.xml").root);

how make everytime build files moved on without having manually everytime change xml?

set 'build action' none when set build action resource - means, vs automatically pack file assembly embedded resource. more resource files on msdn
, when 'build action' none - studio has nothing else do, follow "copy output directory" command.


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -