Problem with installation folder of application by Visual Studio 2019

Apostolos Doudakmanis 121 Reputation points
2023-03-22T08:05:33.45+00:00

I made an application called ApplName and it is version 1.0.0.0

install it and place it in folder "C:/Users/%USERNAME%/appdata/Local/Apps/2.0/folder/folder/applnamefolder"

I upgrade the same application with the name ApplName and it is now version 1.0.0.1

install it and place it in folder "C:/Users/%USERNAME%/appdata/Local/Apps/2.0/folder/folder/applnamefolder1"

Why was the installation done in a different folder from the previous one and not overwriting the previous application?

Why the installation did not take place in the known folder "C:/Program Files/Applname"?

How can I change the installation folder and place it in the folder "C:/Program Files/Applname"?

Developer technologies | Visual Studio | Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Anna Xiu-MSFT 31,056 Reputation points Microsoft External Staff
    2023-03-22T11:06:35.2333333+00:00

    Hi @Apostolos Doudakmanis

    Welcome to Microsoft Q&A! 

    What is your application? How did you upgrade it? 

    If it is a setup project, please ensure that “RemovePreviousVersion" in the Setup Deployment Project Properties window is set to True.

    You can change the default install path by right-clicking on Application Folder in File System > DefaultLocation

    Sincerely,

    Anna


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Apostolos Doudakmanis 121 Reputation points
    2023-03-22T11:28:53.8766667+00:00

    is a VB.net application from Visual Studio 2019 - ClickOne enabled

    by publishing you create a new version of the app when running the app, on startup it looks for an upgrade and if it finds one,

    it upgrades then it creates a new folder with the new version of the app, - it doesn't overwrite the old app.

    So I have 2 folders with 2 different versions and 2 different desktop icons

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.