c# - Changing output path of XAML files in VIsual Studio 2015 Universal App -


i have vcxproj file universal windows app compiles xaml files

<page include="..\view\viewmodel.xaml" /> 

one result of xaml file deployed part of package resource: ms-appx:///appnamespace/viewmodel.xaml

if file path instead "view\viewmodel.xaml" resource path "appnamespace/view/viewmodel.xaml"

unfortunately, since in parent directory, gets flattened , goes in root. want way specify output path, rather let msbuild system preserve it, like

<page include="..\view\viewmodel.xaml">     <targetpath>view\myviewmodel.xaml</targetpath> </page> 

but cannot life of me find way this. there out there?

i think design, couldn't find option in vs tool can specify output path of xaml file.

by default if create view folder in project vs, , create new page in view folder, vs compiler automatically extract xaml file out of view folder , put in root folder of project folder. , created 1 folder in project vs, folder not created in project physical folder.

for example, created folder named "test" vs, , copied image folder. path of image this:<image include="c:\users\(pc-account)\pictures\1.jpeg" />, , not find "test" folder in physical path of project. if create folder named "test" in physical path, not vs, , copy image folder, open project vs, right click "test" folder, adding existing item select second image "test" folder, can see vs:

enter image description here

and in appx folder of project looks this:

enter image description here

as can see, first image added project vs extracted test folder root folder, , second image manfully added project still in test folder.

you can see path of 2 images in vcxproj file this:

enter image description here

i'm afraid there no options in vs tool can automatically work, can only

  1. manually create folder same name 1 created vs tool.

  2. copy .xaml, .xaml.cpp, , .xaml.h file manually-created folder.

  3. add existing item vs folder.

enter image description here

  1. debug project can see view2 folder in debug folder.

enter image description here

  1. in meanwhile, in vcxproj file can see xaml page's path:

enter image description here


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -