I need the Package.appxmanifest Version in a MSBuild.Target. What I do is:
<Target Name="Zip">
<ItemGroup>
<BinDirectoryFiles Include="...\AppPackages\My-App_$(Version)\**\*.*" />
</ItemGroup>
<Zip Files="@(BinDirectoryFiles)" WorkingDirectory="...\AppPackages\My-App_$(Version)"
ZipFileName="...\Zip\My-App_$(Version).zip" />
(I have shorten the paths and the names)
So this is the target where I zip an app package to upload it to HockeyApp. (If I hardcode the complete file Name with the Version number, than the zip target is working.) But to get the right apppackage and the right Name for the zip file I need the Version which is set in the Package.appxmanifest. But I don't know how to get it in my MSBuild.Target in the .csproj file.