views:

148

answers:

5

I was wondering if there was a way I could program and compile .net applications (c#, asp.net mvc) from a usb stick on any laptop I plugged in.

I am lookinjg for a solution that does not have me installing programs on the laptop, so I have to be able to run an ide or editor from an exe and compile presumably from command line.

Was also wondering if I can run MS test projects from command line to check tests passed etc.

Thanks

+3  A: 

Without having tested this myself, I have to say, I don't think you could run Visual Studio from a USB (i.e. install Visual Studio to the USB without installing any files on the PC).

But most likely, you could have your build tools on the USB and use a different editor that could run straight from the USB. I don't know of any that would be good enough to provide a replacement for Visual Studio but depending on what you're going for it might be an option.

A different approach would be to put a virtual machine on the USB drive and have Visual Studio installed in that virtual machine. Then simply plug the USB in, and launch the VM. Still, I'm not sure if you could have VMWare Player run off of a USB drive.. Maybe VirtualBox. In fact, there's this post to support that theory: How To Install VirtualBox in Your USB Drive. Once you get VirtualBox going from the USB drive, setting up a Windows virtual machine and installing Visual Studio and whatever other tools you use should be trivial. You could also enable File Sharing between the host and the VM and store your project files on the USB drive if you need to have access to them from outside the VM as well..

Good luck! and let us know if you find a different option..

Miky Dinescu
+2  A: 

I haven't tried it myself, but you could check out the Mono live cd. This should allow you to install OpenSuse on your USB and access the Mono framework without touching the laptop...

Mono download page

Longball27
+1  A: 

You could have Portable VirtualBox and a virtual machine on a USB stick. That would give you a complete development environment including a stable, known OS to work in.

I use VirtualBox for all of my client development, and it is an outstanding virtualization product. Give it a try.

Adam Crossland
+1  A: 

You could use SharpDevelop, see SharpDevelopOnAMemoryStick.

Also If you have at least the framework installed on the PC, csc.exe should be there in a directory like

C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319

And it could be used to build simple applications (you'll miss resgen.exe to be able to do anything serious)

VirtualBlackFox
Couldn't tell from the linked page, but does this require that the .NET assemblies be installed on the host machine?
Adam Crossland
Yes, i don't think that you could bypass this without a virtual machine, sharp develop being himself a .Net program it need the framework version it was build for (or compatible) to be installed or it won't run. Same thing for Visual Studio even if someone managed to find everything he put everywhere and patch it to stop using the registry so much he will still require a compatible framework version installed.
VirtualBlackFox
A: 

You can compile from the command line provided the computer has the .NET Framework SDK, you can then use an editor like Scite to edit your code and automate the compilation.

Check this

http://msdn.microsoft.com/en-us/library/78f4aasd%28VS.80%29.aspx

Luis
You don't even need an SDK.A C# compiler is provided with a framework, and typically located in somewhere like:c:/{your windows directory}/Microsoft.NET/Framework/v{framework version}/csc
SK-logic