views:

33

answers:

1

Hi

I am wondering how can I make a setup project for each of these projects

  • Asp.net mvc 2.0
  • C# cmd line
  • Application C# web-service

I am using VS 2010 ultimate and I know that I can use the the free edition of install shield for at least the cmd line application. I am not sure about the other 2. I also know about the setup project that you can use. I just need a lot more than the basics so I am not sure how to make either one do these things.

So here is some criteria that each of my setups should be able to do.

Asp.net mvc 2.0 criteria

  1. free (I really don't want to pay for an installer - you can list them just so I am aware of them).
  2. Terms of service
  3. Ability to force a user to setup certain settings. Like connection string, smtp settings. So they should be able to type it in through the setup wizard and the web.config should be updated based on this.
  4. When it installs the stuff it should all be .dlls for all the C# code.

C# cmd line criteria

  1. All criteria as above
  2. I am not sure if this has to be done in the code but I have a html file that contains a template for a message. The path to this file is in the web.config so I a person needs to set this path each time they install it. I tried to do this in code but I could not figure out how to make it find the right path in development and the right path in production. It seems like If you run in VS the path is different.

Web-service

Pretty much everything I covered in the first 2 ones.

Thanks

A: 

If I were you, I would choose WiX as a platform for your installers for all these applications. Some reasoning behind this:

  • it is XML-based, that is, friendly to source control, diffing and merging
  • it has rich set of tools for most of scenarios you might need (harvesting lots of files, creating upgrades and patches, creating multi-lingual installs, etc.)
  • it is free and open source
  • it is production-ready (at least, version 3.0 - later versions are still in beta)
  • it is used by Microsoft to create installations for such products like MS Office
  • it has rich community at [email protected] and StackOverflow
  • it integrates into the VS like a charm
  • it is friendly to build engines like NAnt and MSBuild

VS setup project is not my choice because:

  • it is very limited in set of features-
  • it encourages bad practices like Installer classes
  • finally, it was retired by Microsoft

I'm not familiar with InstallShield Limited edition, though.

Hope this overview will help you finding the best option for your case.

Yan Sklyarenko
Cool I will check it out. Do they have any tutorials on using like .net and this installer? I also heard about the VS setup project one being retired. I don't know too much about the installsheild limited but it seems so many custom actions you need to buy pro or higher version. Like I don't even know how to make a textbox with it to add a connection string.
chobo2
The WiX distributive contains enough documentation both about using WiX itself, and the guideline how to create custom actions in .NET. Beware though, that custom actions is a last resort, when you don't have built-in support or solid third-party extensions. Also, I would encourage you to get acquainted with underlying Windows Installer technology - WiX is just a toolset built upon Windows Installer. Without good understanding of how Windows Installer works you might lead yourself into trouble with your installation program.
Yan Sklyarenko
any good resources for a this windows installer technology. So wix has everything that I need in the box?
chobo2
Here: http://msdn.microsoft.com/en-us/library/cc185688(v=VS.85).aspx. It is vast area, don't expect it to be easy and always understandable. Be ready for challenges and steep learning curve. WiX is a toolset born to ease building Windows Installer packages. Based on what you outlined, I would choose WiX for this kind of installation programs.
Yan Sklyarenko
So I am just wondering how does this work with asp.net mvc setup. Like I know in the vs web setup it has an option to choose the virtual directory. Do I need some custom action for that or what?
chobo2
WiX has a number of standard extensions provided with the toolset. For instance, IIsExtension (http://wix.sourceforge.net/manual-wix3/iis_xsd_index.htm) contains various functionality related to IIS. Take a look at WebVirtualDir element for example: http://wix.sourceforge.net/manual-wix3/iis_xsd_webvirtualdir.htm
Yan Sklyarenko