Question Deploying Console Application

jrobinsontx

New member
Joined
Nov 30, 2022
Messages
1
Programming Experience
10+
I have a console application built and would like to publish/deploy to a Windows 2016 server. I use the publish wizard which produces an "application files" folder and file with "myApp.application" extension to a shared folder on my server. I understand this an install program. When I execute and install my application on my server it works, but does not install where I want. It installs deep under the hood (C:\Users\UserName\AppData\Local\Apps\2.0\Z6GX.....). I was expecting the publish wizard to publish an exe of my application along with needed files to the folder identified in the wizard.

How can I take my console app and install it where I want it on my server? Do I take everything under my bin\release folder and move it where I want it installed?

Using:
Visual Studio Community 2022 (17.4.2)
 
Apparently VS now publishes console apps as ClickOnce applications and so it is installing into that local storage location. You'll want to create a setup project instead instead of letting VS create a ClickOnce deployment for you.
 
I guess I've been doing way too many web apps where it publishes a directory/file layout to be FTP'd or XCopy. Started to expect console apps to be the same.
 
Anyway, for a console app, if you don't feel like making a setup project/program, you should be able to simple do a Release build and just copy all the files from the Release folder to your desired destination. The downside of this approach is that uninstalling is also equally a manual process. There will be no Add/Remove programs entry for your app.
 
Since it's a console app, chances are that he would like to run it from the command line. So now he has to know what directory to run it from, or what to add to his search PATH variable.
 
Back
Top Bottom