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:
and in appx folder of project looks this:
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:
i'm afraid there no options in vs tool can automatically work, can only
manually create folder same name 1 created vs tool.
copy .xaml, .xaml.cpp, , .xaml.h file manually-created folder.
add existing item vs folder.
- debug project can see view2 folder in debug folder.
- in meanwhile, in vcxproj file can see xaml page's path:
Comments
Post a Comment