I have a setup project which gives me a .msi file
Installation attempts fail on this machine, which already had an earlier version installed. A MessageBox reports an error and asks me to remove it from Add/Remove programs.
I have set RemovePreviousVersions = true
Using an updated version it now installs without error, however the referenced dll has not updated to the new version.
What should i do, so that the installer either repairs or uninstalls and reinstalls it automatically?
Please help.
Related
I have a WinForm Application which uses the System.Data.SqlClient package for connecting to the database.
If I start the application with Visual Studio (Debug/Release, Any CPU/x86/x64), everything works as expected, but if I create a Release with the Release Wizard (VDROJ-File) I cannot start the application anymore. I always get an exception
System/Microsoft.Data.SqlClient is not supported on this platform
I am using a .NET 6 application and tried already to change System.Data.SqlClient to Microsoft.Data.SqlClient and I also installed all available runtimes (Microsoft.Data.SqlClient.SNI.runtime, runtime.native.System.Data.SqlClient.sni, ...)
I don't know why everything is working when I start the application from Visual Studio, and why it is not working when I install the application with the wizard.
I found the problem..
The Installer Extension does not copy all neccesarry files in the folder.
It misses applicationname.deps.json. If you copy this file in the install folder, everything works as expected.
See this link
I have an MSI & EXE installer that installs the excel plug-in. The user has option to download exe or msi to install the plug-in. The problem is my applicaiton shows a notification to user if new version of applicaiton is available and if user get new version I always returns the msi file because at that point I don't have any information that user has installed the plug-in through msi or .exe. If user install thorugh exe and install new version with msi the multipe instance installed on same machine. How I can avoid it?
Also, is there any way in C# to know the applicaiton is installed through msi or exe?
You should have two different UpgradeCodes - one for MSIs and one for EXEs. Then new version of MSI will replace MSI, EXE will replace EXE. Also don't forget to upgrade version number, or you will face same issue.
You can't upgrade EXE with MSI, they are treated by system as different products.
How to find the UpgradeCode of installed app
I have a issue with a setup file created in Visual Studio Project Installer.
Previously I created an installer, that just copies the files to the indicated location, without any custom action.
Now I created a new setup file, with a custom action installer class.
When I try to run the new installer on a machine where was installed the old version of the application, during the installation popups an error:
Error 1001. Unable to create an instance of Namespace.InstallerCustomAction installer type. --> Insufficient memory to continue the execution of the program.
If I run the installer on a machine that haven't use the old version of the application that doesn't have custom actions, is installing without any problem.
Also, I always uninstall the old version of the application before installing new one. Checked the Registry, nothing remains in it about the old version.
The RAM and DISK memory is more than enough. I tried also to change the Product and Package code...I get the same error. In fact, if the Product code is different, should not have any conflict even if the old version is installed.
Does anyone had this type of error ever?
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 have a ClickOnce WPF application. It was installing correctly until I changed ReportViewer from Version 10 to Version 11.
I know get the following error when trying to install:
The application requires that assembly Microsoft.ReportViewer.WinForms Version 11.0.0.0 be installed in the Global Assembly Cache (GAC) First.
How do I fix this and still have it using ClickOnce, I can't do a manual install as the users don't have permissions; they only have permissions to use ClickOnce.
I tried changing the Microsoft.ReportViewer.WinForms.dll Publish status from Prerequisite to Include, but still the error persists.
I was able to get this to work on a machine with the same problem although I needed to download two .msi applications.
First I downloaded and installed SQLSysClrTypes. It is located here as it is needed to install report viewer.
Just click download, it'll take you onto a page with a scroll bar. SQLSysClrTypes is near the bottom. Just tick that and hit next, and you can download and install that.
I got report viewer from here.
After installing the both of them. I was able to grab from my ClickOnce with reportviewer 11 and it downloaded and ran successfully where previously I was having the exact same problem.
As an addendum, I was logged onto admin so this solution may not be the best if you don't have admin.
Add it as a prerequisite to the installer.
Right click your project and go to Properties.
Click the Publish tab.
Click Prerequisites....
Find Microsoft Visual Studio 2010 Report Viewer and check it. (There may be a different version available since the update, check for that.)
Upon installation of your application it will now download report viewer for the user.
If you go to the NuGet package manager, you can install the Microsoft.Winforms.ReportViewer 11 version from there. This will get all the dependent DLL files, and everything will be there.