Click here to Skip to main content
15,892,537 members
Please Sign up or sign in to vote.
2.33/5 (2 votes)
Hi,

How can I run command in visual Stidio 2010
command like,

nuget install packages.config

Thanks.
Posted
Comments
Sergey Alexandrovich Kryukov 6-Jul-13 13:12pm    
??????
Richard MacCutchan 6-Jul-13 13:24pm    
Use the "Tools" -> "External Tools" option in Visual Studio and set up a command window to run it in.
H.Brydon 6-Jul-13 21:05pm    
I'm curious why you put viable +5able answers in the comments section and non-solutions or barely useful answers in the solution section.

[If you make this a solution I will +5 it.] - too late I added one myself...
Richard MacCutchan 7-Jul-13 3:50am    
And I'm curious why you are always on my case.
H.Brydon 7-Jul-13 14:15pm    
Largely because you and I seem to be about the same age (?) and have similar history. We should be involved in mentorship and cultivating young minds and being helpful to n00bs (of any age). I see you have high rep points and have written 2 articles (which is a good thing) but your responses to questions are astoundingly unhelpful, many times rude. When somebody asks what an API is you give a link for C++ syntax or something similarly tangential to the question. I guess I have higher expectations of you.

Sergey also replied here for example, and he also can be rude, but he has some very insightful and complete answers that I am impressed with, and I think are helpful to the person asking the quesiton. I have probably contributed about 3000 rep points to him in the last few months. I don't believe I have ever downvoted you but I have only +5'd you 2 or 3 times this year. You seem to have the background and experience but I think you can do better on interaction with others.

I hope you accept this as positive criticism and not a way to be offended. I mean it in the positive sense.

1 solution

You have Visual Studio 2010 tagged but didn't say which language(s) of interest, and have not provided context. I am mostly C++ literate so will describe things from that point of view. You can use command line logic as part of the build process (ie. when building target(s)) or as a standalone tool (independent of a build).

You can run specific commands as a tool (as described by Richard in the comments section). Click Tools -> External Tools to define a prepackaged command. Build a command line and give your tool a name. In the command line, you can use a subset of the build config symbols (ie. $(SolutionDir), $(Configuration) $(Target) etc.) as command line options. You can either implement a single command here or call a batch file, which can contain multiple commands, and can use the parameters you pass to it. Invoking your command is done from the Tools menu.

You can also issue commands as part of the build process. For C++, right click a project, select "Properties", go to either of the items in the "Build Events" or "Custom Build Step" sections, and add command(s) of interest to the "Command Line" item. You can use multiple lines if desired, but the code needs to execute cleanly or the entire project build will get "fail" status.

HTH
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900