通过命令行导出到模板 [英] Export to template via command line
问题描述
$
我希望能够将Visual Studio 2017解决方案(特别是多项目解决方案)导出到模板(.vstemplate)。
我知道按照这些说明使用VS GUI是可行的(参见https://msdn.microsoft.com/en-us/library/xkh1wxd8.aspx) 。
但是我想用命令行或脚本来做这个,这可能吗?如果是这样的话?
我希望将此程序模板作为VSTS CI Build的一部分导出。
谢谢,
嗨ben.pierce,
欢迎来到MSDN论坛。
>> ;
但是我想用命令行或脚本来做这个,这可能吗?如果是这样的话?
是的,有可能。
在较旧的Visual Studio版本中,您可以使用
Projectgen.exe 通过命令行导出模板。
更多信息,请参阅:
https://msdn.microsoft.com/en-us/library/cc175876(v=vs.90).aspx
在Visual Studio 2017中,请尝试使用
dotnet new 命令。
更多信息,请参阅:
https://docs.microsoft.com/en-us/dotnet/core/tools/custom-templates#templatejson
希望可以帮到你。
问候,
Judyzh 跨度>
Hi,
I'd like to be able to export a Visual Studio 2017 solution (specifically a multi-project one) to a template (.vstemplate).
I know this is possible using the VS GUI following these instructions (see https://msdn.microsoft.com/en-us/library/xkh1wxd8.aspx).
But I want to do this using a command line or script, is this possible? If so how?
I want to include this programmatic template exporting as part of a VSTS CI Build.
Thanks,
Hi ben.pierce,
Welcome to the MSDN forum.
>> But I want to do this using a command line or script, is this possible? If so how?
Yes, it is possible.
In the older Visual Studio version, you could use Projectgen.exe to export templates via command line.
More information, see: https://msdn.microsoft.com/en-us/library/cc175876(v=vs.90).aspx
In Visual Studio 2017, please try to use dotnet new command.
More information, see: https://docs.microsoft.com/en-us/dotnet/core/tools/custom-templates#templatejson
Hope could help you.
Regards,
Judyzh
这篇关于通过命令行导出到模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!