I have a web application, where the UI is in seperate folder and solution, the middle tier as well as the data layer in different folders and solutions.
Now I need to create a MSI for my web application. Until now we have been using deployment engine, but now we have been asked to do a MSI as the new server does not support deployment engine.
Usually we create MSI for a windows application, where we take the EXE as the primary output.
Now how do I create the MSI in this situation.
Any thoughts would be appreciated.
regards
cmrhema
Click in your solution and Add a new project: a Web Setup Project
Then add as output your Website.
Important Note:
This will add all the code (.cs / .vb files) and will protect nothing at all, to protect your code (the compiled one) you need to add the Visual Studio Extension Web Deploy Project
Then, right-click in your Website and choose the new option, and add this project as the input of the Setup.
Although the learning curve will be steeper I would recommend using the WIX toolset to create your Windows Installer files - http://wix.sourceforge.net
See also https://stackoverflow.com/tags/wix/info
Related
I have a sample project that is structured like the below image:
The WebApplication2 has depended on ClassLibrary1 at publishing time like this:
I want to copy some needed file in ClassLibrary1 project after publishing in a specific folder, for example in Plug-in/ClassLibrary1/
If you've looked at Orchard you'd see something like this.
Thanks.
In general (regardless of the type of the application) you could define custom actions during deployment, if you build a setup application. I think that limited edition of the InstallShield is the default solution for VS2013. There you could create some custom actions writing a script. Inside this script you could deploy the specific file. An alternative against the InstallShield is the WiX which you could use to build an MSI file using an XML.
Regarding web applications in particular, you could use the publish mechanism provided by the Visual Studio. This tutorial describes how you could configure it so that it would copy all project files. Then you could add the specific file as a project file and copy it each time you publish your website.
Hope I helped!
I recently created a Windows application project using C#. I have completed all the codings. Now i have to deploy the project. So, i created the SETUP of the project using the visual studio's SETUP PROJECT from the Menu. It works fine, i dont have any kind of issues with it. But the genreral setup i get after deploying the poroject is MSi and it looks very simple.
But the thing i need to know is that, is there any way to create a custom setup? The thing i mean to say is that i want to add logo for my project inside the installer. And certain things like during the installation process, the wizzard should ask for user name and password and few more things like these. For eg: if you are insalling a software like visual studio or some other software the installation wizzard is very catchy and the look & feel is good. Similarly i want to get a setup for my project.
Im not sure how to achieve this.
I tried using the installer class of the visual studio project and im not sure if its the correct option for me so instead of wasting time i just thought to ask it here?
I thought that there may be few third party tools for achieveing this. I tried InnoSetup 5.2 but there i have to write programs manually which is similar to pascal.
Also i heard about the tool called as InstallShield, but it costs and im looking for a free alternative.
Is there any third party tool or software for creating SETUP of visual studio projects.? Or is there any method which i can follow to obtain my customized setup?
You can use a Microsoft Setup project or WIX (easily integrate with Visual Studio).
Both are free.
You can do almost all of your customization in setup project by adding custom actions.
WIX (window installer xml) is the better option. You can do a complete customization from wix but it take some time to understand as it is totally based on XML. Microsoft office 2007 and later setups are based on wix.
The difference between wix and Setup project is that you have more control over the GUI of setup in wix than setup project and wix allow much more customization then setup project.
Take a look at this step by step tutorial for wix.
go through topics here Deployment Tasks and Walkthroughs - setup projects are very flexible especially with custom actions. you definitely can setup your own images and tune UI.
If you use Visual Studio MSI
For the first question about adding Icon (based on SplashBitmap), see this MSDN page.
For the second question about authentification input, refer to this other MSDN page.
You can especially use Action personalized, you can follow these steps:
Select the Installer project custom actions in the Solution Explorer. On the View menu, point to Editor, and choose Custom Actions.
The Custom Actions Editor appears.
In the Custom Actions Editor, select the Install node. On the Action menu, choose Add Custom Action.
In the dialog box, select an item in the project, double-click Application Folder.
Select the Primary output from OpenWeb (Active).
Click OK to close the dialog box.
In the Properties window, select the InstallerClass property and set its value to false.
In the Build menu, choose Build Custom Action Installer.
I am looking at making an application more modular and accessing dlls so that I can change them if the client was wanting different functionality.
I know how to create the dlls and reference them, but I am trying to find a way to create an executable that will install a different version of a dll into the required application folder. I want to avoid having to put the new dlls into the original project and build a new install file and I want to keep things simple for the end user.
Currently I am using visual studio 2010
You could create MSI files for each of your dlls and use the standard installer process to update the dll. It is also possible to write an exe that downloads and extracts which will have an arbitrary amount of logic (licensing, download location now and then...).
A combnation of both might seem an interesting thing. A bootstrapper downloading msi files and silently installing them. You could have advanced features in the installer while having the freedom to decide what and when to install on your own.
Technical aspects popping into my mind: files in use may not be changed and if you change the interface theunchanges main program won't be able to use the new library.
It seems you're searching for a plugin architechtecture, you might want to look at MEF or Unity to perform the compositiom, but that is more a side comment.
There are few SO thread available on this great website. You should explorer them and try the best way to implement whatever situation you have..
Check these reference links:
from: Creating a patch to upgrade .NET application
If you already use a a VS Setup Project you can deploy the new version
of this project and it will upgrade existing installations. Have a
look at the setup and upgrade ids. The stop and start of the service
can be done by custom actions that can be defined in the project and
will be executed i.e. when your setup is committed or rollbacked etc.
Patch development in DotNet
How to make Patch-able/Update-able application?
create patch file using .net windows application
Note: Ref this For clickonce how to build a patch for existing installer
i wanna deploy a C# Windows Application project using Setup and deployment project technique
but i don know what should i use
after i open File > New > Project > Setup and deployment > ....
then what ,, what should i do next
In the past I've used the Visual Studio Setup Project or Innosetup for my programs. I prefer to build .msi's over exe's so Visual Studio Setup Project has been my goto for a while now. It is however, very lacking in capabilities. The interface is not intuitive either in my opinion. Every time I build an installer there is a lot of trial and error install/uninstall to get it right. Other's have pointed out WIX and I've looked into it. It appears to be very flexible and since it is open source, we should be able to count on it for the long term.
Here is a recent article about WIX. What I found interesting is the article claims (see link in article) that Visual Studio Setup Project is being End Of Life'd in VS 2010 + NEXT_VERSION. This is a little disconcerting to me. Since I don't want to begin to rely on the new Install Shield "Lite" in VS, I'm going to put effort into learning WIX. I hope it'll pay off in more flexible builds for my applications as well.
All that said, when creating a VS Setup project, I usually use the wizard to put in the initial plumbing. You'll point it at the files you want in the .msi. Typically for me this means the "outputs" of one or more programs in my solution. Any managed assemblies referenced in the programs will automatically get picked up as dependencies and included. Unfortunately unmanaged assemblies don't and I usually have to add them manually using the "File System Editor" mode in the Setup Project UI. Adding shortcuts is a little hokey as well. You right click under the start menu and desktop section of the "File System Editor" mode and select create shortcut. This is all by memory so hopefully I'm getting this right. You will certainly have to test your installer multiple times before you get it just how you want. I like to test under a VM as well.
Finally, the VS Setup project produces a setup.exe and .msi file. Setup.exe is used for detecting and installing dependencies (such as .Net) before unpacking the actual DLL.
When u do this File > New > Project > Setup and deployment >
then right click Application folder> Add > File...and add your app's .exe file and also you can add shortcuts of your app in desktop and program's menu
I would recommend you to go for some tool for creating msi.
I am using WIX
What you need depends on... what you need.
For a large percentage of applications, all you need the installer to do is let the user choose an install location, copy files to a directory structure at that location, and create a few shortcuts. For that, a Visual Studio Installer -> Setup Project is fine. It can handle this basic functionality, as well as installing prerequisites like the .Net Framework redistributables, providing custom install options, and/or writing simple registry keys. The Setup Wizard creates a Setup Project as well, but runs you through a wizard to set up the basics. This is a good option if you've never created an installer before.
If you want this application to be controlled by a larger, more custom install, choose the CAB Project; it will simply pack the necessary files into an archive that is easily accessible from another setup project.
If you are publishing a class library, use a Merge Module. Merge Modules work within install programs themselves, providing files needed for the main application to work.
If you need serious customization, or you want to interface with existing InstallShield logic, I'd get a third-party installer. I've worked with InstallShield before, and it's pretty full-featured, but by the same token, the installers it creates are applications in their own right and can take days or weeks of logic programming to "tweak" to your satisfaction.
The development phase of my project has been completed and now I want create a setup file.
What shoud I add in Application Folder in File System section ?
Where and how can I add my icon of project, database, recource and essential dll file?
In Visual Studio, you add a setup project application to your solution.
Setup is a project type, so it's like adding another .exe.
Visual Studio has a wizard that takes you through most of the steps.
Well if your question is like "How do I create a setup of my project?" You should try reading some of the tutorials on internet:
Creating Setup and Deployment Projects in VS.NET
Setup and Deployment with Prerequisites Included in VB.Net 2008
Serial Number in Setup and Deployment