I have an .Net 4.0 solution, and i use Visual Studio 2010.
in that soulution there is an startup project. I deploy the Project with the Webdeployment method, onto the IIS, the client can then go to the publish.html of the corresponding website, and install the application.
My problem starts when i try to release two different versions of that prooduct and try to install both on the same machine, then the installer thinks that the application is already installed. (after i install the first version of the product, the installer then complains that there already is an app with this name but i changed the product name)
How can i publish two different versions of my project, on two seperate websites? and have them install on the same machine at the same time?
I have found the solution for this problem, as the commenter Franck pointed out, there has to be some sort of distinction between those apps.
So i made just different keys for the different Variations i wanted to deploy:
Rightclick on the Startup project -> Properties -> Tab: Signning-> here one can create certificates for as many Variatons as one pleases, be sure to save the different certificates for later deployments!
when deploying a certain variation i then simply swap the file, and then msdeploy "thinks" it manages different apps.
Related
I am struggling with a issue of making one installer dependent upon other.Suppose i have a setup project Through which, i use to make MSI(or setup) of my c# application for deployment on windows machine. Now suppose i have another project whose MSI(or setup) is generated by another setup project.
Now what i want to make is that when my first setup is run than it will first check for whether second MSI(or setup) is installed or not. If its not installed on target machine then it first set up will run and install second setup, once second set up is properly installed then installer of first continues and completes the its installation.
I can't figure it out how can i check whether second setup has installed or not. i.e how to make second installer dependent upon first installer. I am using visual studio 2013 and the project which i am deploying is c# application
First time i am dealing with making setups for application deployment so may be my way of asking may not be good. Thankyou!
In general that is not possible by means of MSI only since you can't run two MSI installers at the same time. You'll need to use some external solution: a self-made script, InstallShield wrapper etc. The only thing you can do within the MSI is to check that a prerequisite application is installed and if it's not - abort the installation.
Yes, you need to use a packaging tool that either offer out of the box support or you will have to write your own code for this.
You have quite few options here:
-InstallShield
-AdvancedInstaller
-Wix
What you are trying to achieve is known as prerequisite or runtimes required by your application.
As J.Tribbiani mentioned in his answer the solution you need is to use a professional tool like Advanced Installer or the others, to configure your setup as a prerequisite. This is the standard procedure for your requirement.
Here is an example tutorial of how to do it with Advanced Installer:
prerequisite configuration
Or a video of configuring an optional prerequisite, i.e. which the users could choose to skip (let's say if they have an equivalent alternative or want to manually install the prerequisite)
Disclaimer: I work on the team building Advanced Installer
I'm trying to create exe/msi for my solution
it contains the following Projects
ActiveDirectoryEngine: library used to implement AD operations
ADService: windows service - performs the work in the background
CryptographyEngine: library used to encrypt/decrypt data
TerranovaActiveDirectoryHost: Dashboars/win form to manage/check the service's status
SyncToolSetup: the setup project "it only targets TerranovaActiveDirectoryHost"
Here is the contents of the Setup project:
I tried the same steps for different Solution, with ONLY one windows forms application, and it worked fine, but it looks that it doesn't work when I have more than one referenced projects.
The install and Uninstall options are not enabled
Update:
all the previous projects are referenced in the Win forms project, so am I targeting the right one when creating the exe/msi?
The only project with the Install option is the setup project. Other projects in the solution do not have install option just because there is a setup project as part of the solution.
References in a non-setup project (such as a C# build) are not automatically included in a setup project. References used to build code are not necessarily things that need installing on the target system. The setup will try to help with dependencies, but it's unreliable, and only a guide. For example, your Application Folder view contains some files that are part of the .NET Framework, and you definitely don't install them because they are installed as part of the standard .NET framework install.
The setup project must be told what needs to be installed on the target system. There are generally two ways of doing this:
Selecting project output as input to the setup project. This can be rather indeterminate because it's not always obvious what files are included, or what to do if the files need installing to different locations.
Add the files that you know you need one at a time by adding them in the File System view of the directory they need installing into. Typically, executables go into the Application Folder (defaults to Program Files..), data files to User's Application Data, shared files to Common Files folder, some assemblies to the GAC and so on.
Install a windows application !! If Application Already existing in System then Update the Application and If Not Available in System Then Install it.
I have a Visual Studio 2010 solution with 3 projects. It also has a Setup project which I build to create the installation.
It works fine when it's the first installation on a client PC. However, I then modify my project, and build a new Setup, and pass it onto clients. When this happens, the client has to first, manually, uninstall the last installation, and then run the setup.
If they run the setup, without uninstallaing, it seems it doesn't overwrite existing files (exe as well as the dlls). Usually it's just the exe that gets modified. However, it doesn't overwrite it. The version on the client machine seems to stay the same.
Is there a way to force it to overwrite?
Note that when I modify my main application project, I go to the properties of the project, assembly information, and increase the Assembly Version as well as the File Version.
then change new installer version from it's property
for example first installer is version 1.0 and new installer is 2.0, so this is work as update instead of replace/remove
I'm trying to get started with a MVC project that consumes the Office 365 API. I have a MVC project targeting .Net 4.5.1 ready. When I try to add a Connected Service, I can't seem to find that option in Visual Studio.
The extension is installed and I've restarted VS, as mentioned.
I've tried the same with a Windows Store App for Windows 8.1 and got the same result.
I found an answer to a similar question under the Office 365 API Tools page's "Q and A" section provide by Michael Zlatkovsky (MSFT), he suggests:
Close Visual Studio 2013
In Windows Explorer, navigate to C:\Users\\AppData\Local\Microsoft\VisualStudio\12.0\Extensions\
There should be a list of folders there, with names like "qsn5xrd4.5al" (each installation will have different names). Find
the folder that has "Microsoft.Office365ApiTools.dll" within it.
Once you've identified the correct folder, find the file "Microsoft.VisualStudio.ConnectedServices.Contracts.dll", and either
delete, move, or rename it. This particular file is not needed for
the add-in to run, but its presence can cause the issue on certain
machine configurations.
Re-open Visual Studio and try again.
and in case it didn't solved the problem:
try deleting
"C:\Users\\AppData\Local\Microsoft\VisualStudio\12.0\ComponentModelCache"
(I would recommend moving it to the desktop or otherwise making a
backup, just in case). This should flush the cache, and force VS to
re-load the add-in -- now with loading
"Microsoft.VisualStudio.ConnectedServices.Contracts.dll" from its
central location.
How can I deploy a C# Visual Studio 2005 project so that I can run the application in another system? My project has a few dependencies and files that have to be integrated while deploying the project.
What is the best way to handle this?
You need to know what dependencies you have.
you need to have .Net framework installed
you have to explicitly install all dependencies that you used from the GAC on your target machine (some 3rd party components)
and then you just need to copy files from your \bin\Release folder
install all services, etc. if you have any
In the simplest cases only copying files should be enough.
Have you looked into ClickOnce deployment?
It's far from perfect, but for projects without a huge amount of overhead, it's generally good enough.
What kind of project?
Assuming it's a regular winforms application, just copy everything from either the obj\debug or obj\release directory to the new computer. Then run your executable
You can right click on the project file in visual studio and publish to a different location. This will build the site and copy it to the specified directory.
Also, if you need to do anything extra during the build, you can specify custom build actions on the build tab of the project's properties.
EDIT: now that I see you added that it's a windows application my answer doesn't matter. I'd try adding a setup and deployment project in visual studio to handle installing/deploying your windows application.
You more or less have three options (maybe 4?) as I see it.
Windows Installer
ClickOnce
Just distribute
the exe itself
In your particular case I would suggest ClickOnce as long as the project is not massive with too many dependencies.
For other alternatives.
The right answer depends on many criteria.
The simplest way to deploy is by copying files. Just put your .exe, the dependent .dll's, and the .config file in a directory and copy it onto the target machine. It's simple, but there are many restrictions to this approach:
It assumes that the target machine has the right version of the .NET framework installed
It assumes a certain technical competence on the part of the person installing the software.
The installation won't do basic things like create start menu items.
Publishing the program for ClickOnce deployment addresses a lot of these issues, but it's got its own set of limitations. I haven't used it much, so there are probably more than these, though these alone are pretty significant:
Programs are installed into the ClickOnce cache, not the Program Files directory.
If your program does anything outside of the ClickOnce sandbox, you have to deal with security elevation and code signing.
You can create a VS Setup and Deployment project and build an .msi file to install the program. The most obvious drawback to this is that it's complicated: .msi files can do many, many things, and the Setup and Deployment object model is complex, with documentation that is, let us say, fanciful. But there are things you can do with .msi installation that you can't readily do with other approaches, including (and certainly not limited to):
Cleanly uninstall the program through Add/Remove Programs.
Provide an actual UI for installation that lets the user decide where to put the program.
Support scripted installation via MSIEXEC.
Install components besides the program, e.g. databases, COM objects, etc.
Put components in the target machine's GAC.