使用MSBuild,我可以在文件中指定了密码的应用程序上签名吗? [英] Using MSBuild, can I sign an application where the password is specified in a file?

查看:84
本文介绍了使用MSBuild,我可以在文件中指定了密码的应用程序上签名吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在签名应用程序时,通常会运行如下命令行指令:

When I sign an application, I typically run a command line instruction like this:

msbuild /p:project=whatever;platform=all;configuration=sign;KeyFile=key.pfx;Password=pass;RunCodeAnalysis=false;StyleCopEnabled=false

不是在命令行上指定密码,而是有一个MSBuild属性可以让我指定一个包含密码的文件吗?如果不是,是否有建议的签名过程,其中间接指定了密码?

Instead of specifying the password on the command line, is there an MSBuild property that lets me specify a file that contains the password? If not, is there any recommended procedure for signing, where the password is specified indirectly?

推荐答案

如果可以使用BAT/CMD文件代替直接调用MSBuild:

If you can use BAT/CMD files instead of directly calling MSBuild:

您可以使用set /p

set /p MyPassword = <  path\to\file\Password.txt
msbuild ...;Password=%MyPassword%; 

这篇关于使用MSBuild,我可以在文件中指定了密码的应用程序上签名吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆