1

I'm working on a pretty big project and I'm going to implement an auto-update mechanism for it. Now every classes are in one project and the output is just one .exe file and every time the user needs to update the application they need to download the new .exe file.

I thought it would be better to separate the classes in different projects to build different assemblies and every time and assembly is changed the user need to download only that one.

Afterwards I figure it out that every time I rebuild a particular assembly, I need to rebuild the start-up project as well.

Now I need to know what is the best approach to manage the projects of a C# solution for future updates.

CodeCaster
  • 131,656
  • 19
  • 190
  • 236
user3530012
  • 652
  • 2
  • 14
  • 36
  • You don't _need_ to recompile an assembly referencing another assembly when the latter changes, for example as long as you don't alter the members that you already access. Read [A definitive guide to API-breaking changes in .NET](http://stackoverflow.com/questions/1456785/a-definitive-guide-to-api-breaking-changes-in-net). For versioning you can use assembly redirects. Now what exactly are you asking? How to not have to recompile the main executable? – CodeCaster Sep 28 '15 at 21:39
  • Yes, as @CodeCaster said, this is an issue of API consistency. I disagree with ClickOnce, and almost always write my own auto-updaters. – caesay Sep 28 '15 at 21:44
  • @CodeCaster, I rebuild the whole solution everyday. sometimes the version changes but the classes has not changed at all. – user3530012 Sep 28 '15 at 21:46
  • So what's your question then? Don't you like your update system and are you looking for a replacement? If your version changes on a rebuild and you don't want it to, remove the `*` from the version number. If you need other advice, please state what kind of answer you're looking for. – CodeCaster Sep 28 '15 at 21:48
  • @CodeCaster my question is what is the best approach to manage the projects of a C# solution for future updates. I don't want to do it with trial and error. I'm willing to use the standard approaches. – user3530012 Sep 28 '15 at 21:52

1 Answers1

0

ClickOnce could be an option for you. msdn is your friend.

ClickOnce is a deployment technology that enables you to create self-updating Windows-based applications that can be installed and run with minimal user interaction. Visual Studio provides full support for publishing and updating applications deployed with ClickOnce technology if you have developed your projects with Visual Basic and Visual C#.

ClickOnce applications can be self-updating; they can check for newer versions as they become available and automatically replace any updated files. The developer can specify the update behavior; a network administrator can also control update strategies, for example, marking an update as mandatory. Updates can also be rolled back to an earlier version by the end user or by an administrator.

mnemonic
  • 1,585
  • 1
  • 16
  • 25