简体   繁体   中英

Slowcheetah XML transform for c# Windows Store / Metro / win-store app

I have installed SlowCheetah from the extensions gallery, then from nuget (then uninstalled and reinstalled from nuget).

It works ! Almost ;)

That is it is transforming the relevant files and copying them to the bin/[nameofconfig eg Debug / Release]/ folder

However, when running the app locally the file that gets used is that found in eg

D:\\Projects[projectname]\\bin\\Debug\\ AppX

And this file remains as the original untransformed file .

What's the easiest way to get this working when I hit F5 as the extensions description claims it should (for a win store app).

I am guessing a copy file task in the .csproj would do the trick - anyone done this successfully?

Ok, so this seems to work (will have to test it for "Create App Package" later and update this answer then)...

I added an AfterBuild copy file task as follows :

 <Target Name="AfterBuild">
    <Copy SourceFiles="$(OutputPath)\PortiLog.Config.xml" DestinationFolder="$(OutputPath)\AppX" ContinueOnError="true" />
  </Target>

And Voila !!! se fantastique non?

My SlowCheetah transformed xml file is now copied correctly to the AppX folder which is the correct place when debugging locally and corresponds to

Package.Current.InstalledLocation

Thanks to @Christian.K for the answer here which lead me to my solution !

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM