views:

36

answers:

2

I'm doing an RDP into a machine that has just the CLR installed, and doesn't have Visual Studio on it. Can I somehow load all the Visual Studio-specific environment variables on to the regular command prompt and convert it into the VS command prompt so that I'm able to build my projects via command line?

I looked at the vcvarsall.bat file. That calls the appropriate processor-specific batch file. Couldn't get any inputs from there.

A: 

I don't recommend trying to copy only what you need. You'll need other header files, libraries, dlls, etc... You can instead install VS express edition.

If you are trying to debug a problem you can use remote debugging in Visual Studio or use WinDbg on the computer.

Brian R. Bondy
No, basically I just want to build my projects using msbuild via the command line without having Visual Studio installed.
Prakash
@Prakash: See the first part of my answer, or use a different compiler if you can't install VS for some reason.
Brian R. Bondy
@Brian, I don't want to install anything on the remote machine, not even VS Express. I did think of that option, but it's ruled out.
Prakash
@Prakash: Why do you want to compile on his machine?
Brian R. Bondy
+1  A: 

Short of installing all VS, or tracing thru all the various batch files to find out what's getting set, you may be able to simply capture the env vars that are set.

Open up a VS command prompt, and run set > vars.bat

Then open up vars.bat, and put a set command in front of each line.

Not sure how much this will help, since you're going to be missing all the utilities that come with Visual Studio, but it does answer your question.

chris
Thanks, that did the trick.
Prakash