user3218743
user3218743

Reputation: 589

Can I make an application made as a C# Windows Application developed in Visual Studio 2012 as a portable application?

I have made a Windows Form Application in C# using Visual Studio 2012. Can I publish this as a portable application to windows machines ?

P.S. portability here I am referring is working with any Windows( preferably windows 7 or 8 ) machine without installation and .net framework

Upvotes: 0

Views: 221

Answers (3)

Wim Ombelets
Wim Ombelets

Reputation: 5265

Depends on what you understand under portable. Avi's answer certainly works, as does ILMerge, but there's also the one file, no installation needed approach to portability.

I tread carefully because I don't want to advertise any application or another, but apart from taking the entire /bin folder, I've played around with Cameyo in the past and that seems to do a pretty decent job at virtualizing (and rendering portable) most applications as long as they aren't too large (or maybe have too many dependencies on what have you, not sure). Alternative tools may exist, I haven't researched any of them recently and neither do I prefer or affiliate myself with any of them.

Seems to work fine for your average app. I've tried to virtualize Visual Studio, that was fun. Big no-no.
Who knows, it might suit your needs. It still doesn't take away the need for a .NET framework installed on the target machine though. As I mention in comment, that might be something for .NET Native (and, at time of writing, the future).

Upvotes: 0

Georgi-it
Georgi-it

Reputation: 3686

You can if you do not have any dependencies, e.g. you have only the .EXE. If you have some .dlls you can use ILMerge to merge them into one .EXE

Upvotes: 0

Avi Turner
Avi Turner

Reputation: 10456

Yup.
All you need to do is sheep your bin folder. It has your executable and all dependencies.
No installation will be required.

Just bear in mind that in order to be really portable, you will need to make sure that your application does not modify registries or computer configurations.

(from wikipedia:)

A portable application (portable app), sometimes also called standalone, is a program designed to run on a compatible computer without being installed in a way that modifies the computer's configuration information.

Upvotes: 2

Related Questions