How to create csproj command line?

依然范特西╮ 提交于 2019-12-02 02:05:56

问题


Is there any way to create a CS and WPF solution of Visual Studio templates from command line?

I wrote a C# and WPF code generator, and I want that my output be a C# solution.


回答1:


To create a Project from command line, simply create and save a Project and use a commandline to copy the folder.

Or using Visual Studio DTE2: http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/72d6608b-2e9a-4bc4-b294-b75db17bcad2/

Or to create a Project Template Using the Projectgen.exe Command-Line Tool http://msdn.microsoft.com/en-us/library/cc175876(v=vs.90).aspx




回答2:


Hmmm, what would be the use of it?

I think you can take a look at the /Command switch for devenv:

devenv.exe /Command np

where "np" stands for "new project".

Here is a list of the available commands: Predefined commands, try to play with it...

But I think it would be much simpler to zip an empty solution and just copy it in your script file instead of asking VS to do it over and over again...



来源:https://stackoverflow.com/questions/11598427/how-to-create-csproj-command-line

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!