通过命令行导出到模板 [英] Export to template via command line

查看:107
本文介绍了通过命令行导出到模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 
$


我希望能够将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屋!

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