在命令行上生成解决方案文件(从头开始创建新的解决方案)?
是否有一个命令行工具(特别是在 cygwin 中)可以为我生成模板解决方案文件?当我使用 Sharpdevlop GUI 并说我正在做一个新项目时,系统会提示我进行选择,然后 SharpDevelop 会自动为我生成 .sln、.csproj、.cs 等文件。如果发生的只是复制模板并填充一些变量字段(如项目名称),那么就可以在 cli 上执行此操作。
在我看来,它看起来像这样:
$ #remember: I'm in Cygwin if that matters
$ ls
./ ../
$ sharpdevelop-init "Windows Application" Test #or mono-init or something...
$ ls -R
.:
Test/ Test.sln
./Test:
MainForm.Designer.cs Program.cs Test.csproj obj/
MainForm.cs Properties/ bin/
..... etc ....
有这样的命令行工具吗? Mono 显然完全符合我的要求,但我想知道执行此操作的命令行界面。
Is there a command line tool (I'm in cygwin specifically) which can generate template solution files for me? When I use the Sharpdevlop GUI and say I'm doing a new project, I am prompted with choices that I can choose from, and then SharpDevelop automagically makes .sln, .csproj, .cs, etc files for me. If all that's happening is that templates are being copied over and a few variable fields filled in (like project name), then it's just as possible to do this on the cli.
In my mind it would look like this:
$ #remember: I'm in Cygwin if that matters
$ ls
./ ../
$ sharpdevelop-init "Windows Application" Test #or mono-init or something...
$ ls -R
.:
Test/ Test.sln
./Test:
MainForm.Designer.cs Program.cs Test.csproj obj/
MainForm.cs Properties/ bin/
..... etc ....
Is there such a command line tool? Mono obviously does exactly what I want, but I want to know the command line interface to do it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不幸的是,据我所知,没有这样的命令行应用程序可以执行此操作。
在我看来,最接近此类应用程序的是使用 PowerShell和 NuGet 从命令行自动化 SharpDevelop,允许您安装 NuGet 包。 NuGet 包可能包含您的文件模板。这与您想要执行的操作不匹配,因为需要已经创建解决方案和项目文件。
Unfortunately there is no such command line application that does this as far as I am aware.
The closest thing to such an application in my opinion is using PowerShell and NuGet to automate SharpDevelop from the command line allowing you to install NuGet packages. A NuGet package could contain your file templates. This does not match what you are trying to do since the solution and project files need to have already been created.