Visual Studio Publish Project Into One Simple Installer

前端 未结 1 1349
北荒
北荒 2020-11-22 16:51

I\'ve got a sizable project, with multiple classes, 500+ images, and 20+ text files associated with said project.

I\'ve been publishing my project via right clicking

相关标签:
1条回答
  • 2020-11-22 17:30

    The Ancients: If the below is TL;DR (too long, didn't read), please skim these two links:

    • Troubleshooting Setup and Deployment Projects
    • Why use Windows Installer XML (WiX) over VDPROJ?

    UPDATE: September 2018 - Since this "answer" was recently downvoted, let me try to add some more links to see if the intent of the answer can be made more clear. Not to be overly dramatic, but:

    As deployment specialists we have to warn people when they commit to using a tool that is bound to fall apart for them down the line when more advanced deployment requirements invariably surface.

    The installer projects have several times been pulled back and then re-introduced in Visual Studio. Always based on the problems seen with these project types (just the bigger ones):

    1) No MSBuild support (not tested extensively by me, but by others), 2) only deferred mode custom actions running in system context (not insertable in GUI), 3) highly limited control overall (always advertised shortcuts, no ability to configure certain things, etc...), 4) no support for proper service installation - requires custom actions instead, 5) very few available prerequisites to bundle, 6) rudimentary GUI with little flexibility, 7) appears to not be possible to define MSI features (as in features and components), 8) problems with 32 / 64 bitness issues for custom actions, etc...

    An old MSDN page on this project types and its problems: Troubleshooting Setup and Deployment Projects.

    MSI Expert Chris Painter and others:

    • Are Visual Studio Setup projects suitable for complex setups?
    • Why use Windows Installer XML (WiX) over VDPROJ? (recommended)

    In my opinion the project type can only work for simple.NET applications. Any complexity of caliber and you are in trouble. SQL Scripts, IIS, proper COM / COM+, Users & Groups, Shares, Firewall Rules, Custom GUI, etc... Commercial tools and WiX have advanced support for these things. The internals of the compiled MSI files are also sub-standard (use of self-registration, custom actions for services, etc...). I often experience that the tool stops working for "some unknown reason" as well. Suddenly it won't compile. Concrete Example (with fix).

    Alternatives:

    • Simple List View of Deployment Tools
    • WiX Quick-Start Hints (if the tool needs to be free)

    • How to create windows installer (links to all kinds of deployment tools, summary of MSI advantages and some brief descriptions of trending deployment technologies)

    The open source WiX toolkit features a component called Burn to create such setup.exe launchers / downloaders / bootstrappers - used to run several installations in sequence and / or install prerequisites (a very common task - Visual Studio projects only support a few prerequisites).

    Writing WiX XML markup code is necessary to use this Burn feature. Commercial tools Installshield and Advanced Installer provide GUI-features to build such setup.exe files.


    The Visual Studio installer is very limited, I never use it. WiX (link to an answer trying to provide some links for a WiX crash course) is a full blown, open source deployment solution. It will take you a while to master, but it is very good and flexible. A commercial solution such as Installshield or Advanced Installer will allow you to deliver a setup faster and easier, but they can be very pricey.

    Given the limitations of Visual Studio Installer projects (and bugs), I do believe the right solution is to use a different tool: What installation product to use? InstallShield, WiX, Wise, Advanced Installer, etc. If you need anything advanced at all, you will struggle otherwise. With a more advanced tool it is at least possible to do what you need, even if it might be more involved at times.

    Let me know what you want to know about such a process, and I will try to help. I am not sure what software you are delivering, what the target user group is, what budget you have, etc... Windows Installer is highly desirable for a number of corporate benefits, but other deployment technologies exist (see the description above of various tools to use).

    0 讨论(0)
提交回复
热议问题