Thread: .NET framework distribution

  1. #1
    Registered User
    Join Date
    Jul 2011
    Posts
    62

    .NET framework distribution

    Hello all!
    So I use the .NET framework (with C# to be exact).
    I was thinking on how to distribute the framework version (in case the user doesn't have it) and on how to check if the user has it or not.

    So as a recap...

    I want my program to start running, check if user has the .NET framework (as opposed to main() starting the Application right away). If he does, run, if not, install it.

    I can include files with the installation (of course) and possibly use those to install it.

  2. #2
    Registered User
    Join Date
    Aug 2003
    Posts
    1,218
    Do you have Visual studio 2010? If so create a deployment project (easiest is to just right click the solution, select Add -> New Project, then under "Other project types" -> "Setup and Deployment" select "Visual Studio installer" and then "Setup Project"), then rightclick the new project and select View->File System. Here you will add the stuff that you want to install on the users machine, this could be an output of another project within the same solution (if you added the deployment project to the same solution as the other project this is probably what you want) or some other exe and so on. You can also add shortcuts to desktop and to start menu and so on.

    Now the beauty of using this is, if you add the project output from a project that creates a .NET exe, the installer will automatically add any and all dependencies, so it will automatically detect at install time wether the appropriate .NET version is already installed and so on. If you expand "Detected dependencies" after adding a .NET project output to an application folder you should see something like "Microsoft .NET framework" in that list. So now everything is taken care of

    This method will also detect other external dependencies you have (say you use a .NET dll for database connection, it will automatically be added and shipped).

  3. #3
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547

  4. #4
    Registered User
    Join Date
    Jul 2011
    Posts
    62
    Quote Originally Posted by Shakti View Post
    Do you have Visual studio 2010? If so create a deployment project (easiest is to just right click the solution, select Add -> New Project, then under "Other project types" -> "Setup and Deployment" select "Visual Studio installer" and then "Setup Project"), then rightclick the new project and select View->File System. Here you will add the stuff that you want to install on the users machine, this could be an output of another project within the same solution (if you added the deployment project to the same solution as the other project this is probably what you want) or some other exe and so on. You can also add shortcuts to desktop and to start menu and so on.

    Now the beauty of using this is, if you add the project output from a project that creates a .NET exe, the installer will automatically add any and all dependencies, so it will automatically detect at install time wether the appropriate .NET version is already installed and so on. If you expand "Detected dependencies" after adding a .NET project output to an application folder you should see something like "Microsoft .NET framework" in that list. So now everything is taken care of

    This method will also detect other external dependencies you have (say you use a .NET dll for database connection, it will automatically be added and shipped).
    Thanks a lot! I had no idea VS 10 for C# did that xD

  5. #5
    Registered User
    Join Date
    Jul 2011
    Posts
    62
    Hum. It appears I'm not quite done yet.
    Right now I've successfully made the install file.
    But
    It asks me if I want the application to update automatically.

    Now I would like that a lot, but I'm not entirely sure onto how is it done (and how it works).

    Let's say my application is an .NET exe, that requires certain hand-made files in a Resources folder during run-time.

    Do I understand this correctly, that if I put those files into the update folder, AFTER the user sets up the initial exe, they will be download as patches?

    As well, if you have any more information considering that please do tell me. After looking in Microsoft's website on that topic nothing of this kind has been explained.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Exponential Distribution
    By charlest in forum C Programming
    Replies: 1
    Last Post: 11-24-2009, 09:37 PM
  2. Gamma distribution in C#?
    By dudeomanodude in forum C# Programming
    Replies: 2
    Last Post: 06-07-2008, 01:59 PM
  3. Some .NET Distribution Stats
    By nickname_changed in forum C# Programming
    Replies: 2
    Last Post: 05-14-2005, 03:41 AM
  4. I'm looking for a new distribution of Linux...
    By deathstryke in forum Tech Board
    Replies: 5
    Last Post: 05-13-2004, 03:30 AM
  5. Best Distribution
    By gnu-ehacks in forum Linux Programming
    Replies: 4
    Last Post: 11-21-2001, 03:59 AM

Tags for this Thread