Search code examples
c#windowsconsoleupdates

How do I make my C# Console .NET program update when I run a function?


This is a duplicate of How to automatically update a C# .Net console application?

I am making a project that I'm going to show at school. I don't feel like downloading the new projects over and over again. I would like a method to update the C# console project when the user invokes the update function. Any way I can do this?

I looked at some of the methods in the previous post, but they looked too complicated


Solution

  • Add a post build script that copies the files to some shared drive whenever you compile. And run the program from that share. This is by far the simplest approach.

    Next step up is to add the built files in a shared git repo and run a pull command whenever you want the latest version. You could use a script to automatically push a new version for each build, but I would argue that it would be better to do this manually, so you have some chance to test changes before publishing.

    Or use some remote desktop software and only run the program on your development computer.

    You can make it a whole more complicated, with update servers, click once, and other things, but I would not think that is suitable for some small utility for schoolwork.