我最终做了同样的事情@Dave Smits:
(1) 将Package.appxmanifest的内容复制到一个名为Package.appxmanifest.template的新文件中,并添加到项目中。
(2) 保留解决方案中的 Package.appxmanifest 文件,但将其从源代码管理中排除。
(3) 创建了一个 powershell 脚本并将其添加到源代码管理中(见下文)。
(4) 在构建时执行这个 powershell 脚本。对我来说,这意味着在构建解决方案之前添加一个 PowerShell 步骤。
param([io.fileinfo]$template, [io.fileinfo]$package, [string]$version)
[xml]$xml = gc $template
$xml.Package.Identity.Version = $version;
$xml.Save($package)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
370 次 |
| 最近记录: |