Automating installation process of a cross platform application - c#

I've developed a console app in C# and the code is hosted on GitHub.
The app will be used on Windows and Linux.
I'll create a CI/CD process so when I push the changes to GitHub using a Tag with the following format "version x.x.x" the CI/CD creates an Installer/Package with the following format:
appName-1.0.0-windows.extension
appName-1.0.0-linux.extension
The question is:
What application/process can I use so the users of my app using one command on the Windows/Linux terminal can download the app from GitHub Releases and install/extract the app in a directory?
Ideally I would like to use the same tool on Windows and Linux

Related

Issue with launching Feedback Hub from UWP app

I followed these two docs (Doc1, Doc2) to integrate Feedback hub in my app. I used NuGet to install the Microsoft Store Services SDK.
As recommended I am using StoreServicesFeedbackLauncher.IsSupported() to check if the Feedback hub is available or not. This works locally on my machine, but in production all customers hit System.Exception with message "Method 'StoreServicesFeedbackLauncher.IsSupported()' was not included in compilation, but was referenced in HomePage.<feedback_tapped>d__23.MoveNext(). There may have been a missing assembly."
I have read the docs again and don't seem to have missed any of mentioned the steps.
Edit
This app is a Desktop Bridge app. The solution has a UWP app which communicates with a win32 exe. I am trying to launch the app from UWP app. The solution has a Windows Application Packaging project to package the app.

UWP App update with own server

I'm searching a way to update a Windows Universal App without the Store, so i can provide the appxbundle file from my own server. I can download this package from within the app, but i have not found a solution for installing it. The device portal core API allows only the Installation of apps, but not updating. So is there a way I can start the updating process from within my app's code?
You can package your app for Web Install, which works very similarly to Click Once for classic desktop apps. This involves pointing the user to a link with ms-appinstaller: protocol which will launch the app installer and install the package. You define the .appinstall file which contains a standardized description of the components of the app, the location of potential updates, and specifies an update policy. Automated update are described in depth in this blog post.
Update
In addition to web install, you can apparently update the app using PackageManager. See this blog post for details.

How to run DB migrations in console application in team services deploy task?

I'm looking to move an ASP.NET Core application into Visual Studio Team Services for continuous integration and continuous deploy. My application is currently built and deployed "manually":
Build by "publishing" to Web Deploy package in Visual Studio.
Apply DB-migrations (implemented using Simple.Migrations) by running a console application (built along with te web app in step 1) on the target server.
Deploy the built web app using Web Deploy on target server.
And now I would like to automate this process using Visual Studio Team Services. Building the web app (step 1) and deploying it to an Azure App Service (step 3)seems pretty straight forward. But I'm not sure how to apply my Simple.Migrations database migrations (step 2). Is it possible to run a console application (built along side the web app during the build phase) in the deploy phase? A task for running command line scripts certainly exists but I'm not sure what you can actually do with it.
Note that I would like to use the hosted agent (if that makes any difference).
There is a built-in task called: Deploy: PowerShell on Target Machines. This task uses Windows Remote Management (WinRM) to access on-premises physical computers or virtual computers that are domain-joined or workgroup-joined. This task can run both PowerShell scripts and PowerShell-DSC scripts.
Not sure if you could put your console application code in a ps script or directly Run a C# .cs file from a Powershell Script . Another way is using PowerShell run DB migrations. A sample for your reference: Use PowerShell to Migrate SQL Server Instances (db, logins, jobs, etc)

How to run DNX 'console app' as a background service on Linux?

I've implemented a DNX (dnx451) 'console app' which is intended to run as a background service. On Windows I would just turn it into a Windows Service. What is the proper way to do this on Linux (for instance, Ubuntu)?
EDIT:
Found more info here: How to migrate a .NET Windows Service application to Linux using mono?
On Unix/Linux operating system you can turn any program into a background service like
dnx run &
The "&" turns the "dnx run" it into a background program (when I remember right for your current shell session). For real background services look at the startup scripts of common Unix daemons like mysql or apache httpd. They get started by the initd/systemd processes and then execute on their own.

How to automatically update a C# .Net console application?

I have a Console application (executable) written in C# .Net that users download and run locally.
The users download a zip and extract it to a local directory and run (using command line parameters) via the command line from that location.
Since users will not check for new version I need a way for the executable to check for a newer version of itself and automatically download it and overwrite itself (or at least notify the user).
I have looked at the possibility of using clickonce but that is geared towards windows applications.
All the questions/threads I have looked at only concern auto updating windows applications so are no good for this scenario.
Is there a way (or pattern) to auto update a .Net console app or do I have to write code within the console app to check its version against the server and notify the user?
If its made Clickonce it will break it as a console app - http://social.msdn.microsoft.com/Forums/en-US/8be48914-6563-47cb-9bff-e5e72047bb69/c-console-application-always-is-a-click-once-app

Categories