views:

420

answers:

11

I develop application in C# with MSVC 2010 Express, with Forms/WPF/etc.

Application consist of some private assemblies (maybe DLLs) and .exe file. It uses .NET 4 features.

How I deploy this application to other computers? Of course if they have .NET 4 I just can send zip of .exe with .dlls and it work. But if they don't have .NET at all (on Win XP machine)? Or maybe they have lower version of .NET? Should I point them to install .NET from internet or package it with my app or what?

Thanks

A: 

Yes, you should point them to install .NET. Otherwise it won't be possible for them to run your application.

Forlan07
+11  A: 

There is click-once deploy from microsoft. It automates most of the tasks, including making sure you have the right .Net version and updating the app if a new version of your app is available.

Remy
You should say also that ClickOnce will install the .NET framework and other dependencies (e.g. SQL Server Express) if required.
Kieren Johnstone
is this available in the express edition?
Stefan Egli
+2  A: 

http://support.microsoft.com/kb/324733

Flakron Bytyqi
A: 

yes! you have to give some general instruction about prerequisites to run your software and in that you can mention the Framework version 3.5 or 4.0 and other utilities you require.

please refer this document for Choosing a Deployment Strategy in Visual studio 2010 may this can help you http://msdn.microsoft.com/en-us/library/e2444w33.aspx

Kishore Kumar
A: 

hai use can use the depoly wesite directly to the remote website when u publish to the remote server

vigna hari karthik
Even if you don't have great English skills, NEVER, NEVER write 'u' instead of 'you'
Will Dean
wtf? 'hai' first time I've actually seen someone use it! sad, sad state of affairs..
Darknight
WTF is an abbreviation. Your grammar is appalling. No punctuation. F
Ben
Is "depoly" some kind of chemical term?
codymanix
+1  A: 

You didn't say what type of clients they are (are you making a small app for your friends to use or are they paying customers), but whatever the case may be, I'm always completely against sending a zip file with an instruction document describing what to do with it and what folder to extract it to. As Remy said, ClickOnce is not a bad idea, but I've found it to be a bit of a pain to set up (once you get it set up, though, it works just fine). On the other hand, a Deployment project is simpler and if I were you, that would be the first thing I'd explore.

Vedran
Say paying customers, is it really matters? What is Deployemnet project?
zaharpopov
A Deployment project (or a Setup project) is a Visual Studio project that generates an install package for your application.
Vedran
@Vedran which is not available in the Express version of Visual Studio
Rune FS
+9  A: 

You should create a installer package. If you are using the express versions of visual studio, you can use some free tools for this like WiX or Inno Setup. WiX is perhaps a difficult option to start with, but has a lot of flexibility. There are tutorials and example projects to modify to adapt them to your needs. http://www.tramontana.co.hu/wix/

This tools create installers that can check if a certain version of the .NET framework is installed on the user computer, among other conditions. You can also include the .NET redistributable in your package, or point the user to download and install it.

Alejandro Martin
+1 for WiX. You should definitely prefer it over Visual Studio deployment projects, it's much more powerful and much easier to integrate into an automated build process.
Daniel Pryden
WiX is fine what what it does, but current released versions are basically no help with the OP's problem which is how to get the framework installed before installing the app. I know WiX 3.5 will help with this, but I don't think it's even ready for pre-official-release deployment yet.
Will Dean
How big is .NET redistribitable and how I get it from where?
zaharpopov
Alejandro Martin
A: 

when you package you application,you shoud include the .NET Framework

Encounter
+1  A: 

hi,

Use xenocode here

http://spoon.net/Studio/

No need to install anything. It converts your exe to Native code indirectly and you can run anywhere on windows system. It also has some option of adding framework inside and the total exe size will be somewhere arround 10MB + Your application exe size..

Thanks

prashant
It's not always ideal to use `ngen` or similar tools to convert to native code. It might well make the assembly/app smaller, but will lose out if for example `ngen` is run on a 32-bit machine then the user has a 64-bit machine.
Kieren Johnstone
But they mention that they now supported Windows 7 and 64-Bit also.So lets try it.i haven't tried yet.
prashant
A: 

Check out Inno : http://www.jrsoftware.org/isinfo.php It's free and pretty simple.

OTOH I've seen QTTabBar using it in its' codebase and it was literally one single text file (setup.iss). Let me see if I can find URL to their SourceForge page so you can see the source and the build ... There is it http://qttabbar.svn.sourceforge.net/viewvc/qttabbar/trunk/Install/ If you grab the source tree you can probably re-fit it for your app in a day.

ZXX
+1  A: 

We try to keep deployment as simple as possible, and one of the things we do is to ensure our application is just a single executable, no support files needed.

We several steps to get there:

  1. Make sure all dependent resource files are stored in embedded resources where possible, and not on disk
  2. Use ILmerge to link all assemblies into a single executable
  3. Optional - obfuscate the assembly
  4. Optional - If some parts cannot be ILMerged or obfuscated, forcing us to have multiple files, we use Xenocode's PostBuild to link all files into a single executable. Xenocode offers a virtual filesystem to do this. This also allows framework embedding so your app will run on a clean Windows install - no dependencies need to be installed :-)
  5. Wrap the single executable into an msi installer using WiX
  6. Wrap the single executable into click once deployment. For this we also use a little stub launcher executable which starts the main application, allowing us to reuse the same main application executable
  7. Create a zip file of just the single file executable for manual installation.

We the following on our downloads site:

  1. the MSI installer - we prefer people to use this one
  2. A zip file with the Xenocoded (single file) executable
  3. A zip file with the Xenocoded (single file) executable including the .NET Framework