Install Two Instances of WPF Application on Same Machine - wpf

I have a WPF application. I used Visual Studio to publish it to a folder on my machine. I then clicked on the application to run it. Before running it, the application asked me if it is ok to install it. I answered in the affirmative. Then I changed the config file in Visual Studio to point to another database instance and published to a different folder. I clicked on this new application to run it. This time I was told that I cannot install the application as it was already installed on my machine. Any way around this issue?

Related

Vb.Net Application installer not updating access database

As the title says my vb.net application installer is not updating the correct database, the application works fine when debugging with visual studio, however when i install it the database in the data directory is not updated to the latest.
I use "Microsoft Visual Studio Installer Projects" to make an installer with all the needed files, this is how i have set it up:
Application Folder:
Image
User Desktop: I have just a shortcut to the .exe in the application folder
User's Program Menu: I have a folder with the app name and inside that a shortcut to the .exe in the application folder
When installed into the computer the database is not the latest and i know this because when i try to use a button with an insert query the app gives back an error non being able to find a column, "ID_User", that i just recently added.
Database connection string:
Dim conn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\Account.mdb")
More Info:
I used the visual studio deployment wizard to create the setup files instead of the Visual Studio project installer and the application works just fine so i assume its a problem just with the other installer and how its configured but i cant figure out whats the problem, i always used it and never had problems until the latest release.
Edit:
I tried adding the database inside the application folder in the Visual Studio project installer and setting the property of the database to always copy it inside the output directory, still no luck.
Solution:
I don't know either what happened but somehow i might have messed up something in the database while editing it, i made a new one with the same fields and replaced the old one, now everything works just fine.
Edit 08 Jan 2021:
Same problem happened again, and this time i think i know why... i edited the database again but i didnt open the file directly but from Visual Studio solution explorer and then edited it. When i tried installing the new version it didnt work again and when i changed the database it started working again. So i think the problem is that the visual studio db editor doesn't save changes somehow.

Windows Installer 4.5 Doesn't appear in the prerequisites component list

From Prerequisites on the setup property pages, I selected the option to Download prerequisites from the component vendor's web site
There is no Windows Installer 4.5 in the prerequisites to install option..
because every im installing my setup using the sqlexpr_x64_ENU.exe in custom actions to install, run the setup after the extracting sqlserver it pops up the window says
There is a problem with this Windows Installer package. Aprogram run as part of the setup did not finnish as expected. Contact your support personnel or package vendor
im using VS2017 on windows 10
Exclude MSI Engine: You should not include Windows Installer 4.5 with any package these days. This runtime is from back in the day of Windows Vista - we are long since on version 5. Windows Installer should be deployed only via Windows Update as of today - in my opinion. Leave the runtime out of your setup.
No Concurrency: You can not run an MSI setup from within another MSI setup via a custom action. This is due to technical restrictions. There is a mutex set when an MSI runs its actual installation sequence, and triggering another installation sequence from within it will fail. A similar answer on the topic.
Setup.exe Launcher: What you need is to install your pre-requisites via a setup.exe launcher instead. This runs installations in serial, not in parallel. Which version of SQL Server are you installing? I see only a couple of versions available in the Visual Studio Installer Project launcher.
Other tools have features to allow you to install a setup.exe with embedded packages of various kinds in sequence. I have explained a myriad of times how to do this in previous answers. Here are just a few that I found quickly:
SQL Server named instance with Visual Studio 2017 Installer project (basically exactly the same issue - I suggest WiX the open source, free alternative)
Custom installer for application in Visual Studio 2017 (I suggest WiX and several commercial tools that are easier to use - maybe try to read this one)
Cannot call command.exe(SQL Server Setup.exe) while calling C# CA with parameters
How to create a MSI file which simply copies a directory to Program Files? (tools list)
Combine exe and msi file in one installer
Visual Studio 2017 Installer Project - include VC++ 2015 Redistributable
The general situation:
The problem is not Windows Installer 4.5, it's the fact that you are trying to do a recursive MSI install (the SQL one from inside yours) which is not allowed and will fail.
The MSI 4.5 engine is pretty much obsolete, about 10 years old, and anyway it's not the issue, and it's not clear why you believe it is. But it IS in the Prerequisite list on my VS 2017 setup project prerequisites - see 3 - even though you almost certainly don't need it.
There are some SQL Express options available in the Prerequisites of the VS setup project - right click the project in solution explorer and choose Properties, then Prerequisites.

How to remove node server from Visual Studio Solution

I am learning AngularJS by following Pro AngularJS book.
As per the instructions given in the book, downloaded and installed nodejs and created SportsStoreServer.js file within nodejs installation folder. Hence, I need to start this server to be able to work with my Visual studio project.
But, after some days; now, I am thinking to use Visual Studio Development Server only instead of running nodejs server separately to be able to run my Visual Studio solution. But, I am not understanding how to uninstall nodejs server.
What I want to do is, I should be able to run my Visual Studio project by just pressing F5. I don't what Node involvement in the middle.
When I verified in Google, all the available resources were talking about how to uninstall nodejs from System. But, I am unable to get the solution for running my Project inside Visual Studio solution.
Can anybody please suggest me on this?
I think you might need Node Tools for VS . Here is a getting started guide -

Where did setup install my WinForm application?

I recently developed an WinForm application that I wanted to run on my local SQL server using SQL Agent. I published the WinForm app via Visual Studio and copied the files (three listed below) over to my SQL Server where I ran the setup.exe program.
Application Files (directory)
MyApplicationName.application
setup.exe
My application installed and started up automatically.
Now that I have to schedule the job with SQL Server Agent I cannot find where the application was installed to on the filesystem. I can see the shortcut on the Start menu but it just points to a shortcut. The shortcut does not seem to have any indication as to where the actual application file exists.
I tried to point to the shortcut as the application SQL Agent should start but all I get is "junk text" in the path.
Visual Studio uses ClickOnce deployment to publish WinForms applications. The installation folder varies by Windows version. For example on Windows XP it is
C:\Documents and Settings\USERNAME\LocalSettings\Apps\2.0\
and on Vista and above it is
C:\users\USERNAME\AppData\Local\Apps\2.0\

Each time I load my application, it attempts to repair the existing install. It is an issue with the vs2008 setup and deployment project

I have created a win forms application that is installed using a setup and deployment project. During a recent update to the setup and deployment project, I've caused a problem that I can not find the source of. Each time I click on the shortcut to my project, it runs the setup again. In effect it is repairing the install each time the shortcut is clicked.
Also, this issue is related to the shortcut that is created by the setup and deployment project. If I go directly to the console.exe file and run my application it does not attempt to repair it.
Using visual studio 2008 and I have custom actions that run on the install, however I can't see how they could cause the application to repair itself on load.
Thanks

Resources