Open Closed

Upgrading a ASP.NET Zero Project #167


0
ardrian created

Hi,

What is the best way to upgrade a project using ASP.NET Zero, when a new version is out.

I understand that it is impossible to provide a solution which supports auto-updating, as there may be breaking changes in new editions. But what would the best practice be.

For example right now I have a project using ASP.NET Zero 1.1.0, and 1.2.2 is out. What would a decent approach be?

Thanks


1 Answer(s)
  • 0
    hikalkan created
    Support Team

    Hi,

    Thanks. This can be asked by other customers too, I will explain briefly here:

    We can split updating to 2 parts:

    1 - ASP.NET Boilerplate (the framework) and module-zero (base domain logic for user, role, tenant... management). They can be easily updated since they are distributed on nuget. Here, a list of nuget packages:

    • <a class="postlink" href="http://www.aspnetboilerplate.com/Pages/Documents/Nuget-Packages">http://www.aspnetboilerplate.com/Pages/ ... t-Packages</a>
    • <a class="postlink" href="http://www.aspnetboilerplate.com/Pages/Documents/Zero/Nuget-Packages">http://www.aspnetboilerplate.com/Pages/ ... t-Packages</a>

    I don't make 'hard-to-adapt' breaking changes on these libraries. If there is a breaking change, I add it to relase notes and I document how to migrate. Release notes for ABP: <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/releases">https://github.com/aspnetboilerplate/as ... e/releases</a> and release notes for module-zero: <a class="postlink" href="https://github.com/aspnetboilerplate/module-zero/releases">https://github.com/aspnetboilerplate/mo ... o/releases</a>

    So, upgrading this part is easy. Just update nuget packages.

    2 - AspNet Zero - the startup template: UI views and application services

    This part is not developed as a 'closed' framework/library. Because different companies have very different needs and you will want to extend/change it upon your needs. That's why we call AspNet Zero as a starter kit/template.

    First of all, in most cases you don't have to upgrade if you are happy with your solution. Even you might build the same feature yourself before me.

    If you like new features, you should manually adapt changes to your existing solution. In this case, Github repository will helpy you much (<a class="postlink" href="https://github.com/aspnetzero/aspnet-zero">https://github.com/aspnetzero/aspnet-zero</a>). You can compare releases and copy changed parts to your solution. I actually advice you to review each commit to check if it's also needed for you. Because some of they can be bugfixes.

    If you want more automatic way, I did not tried before but, you may use your source control's (say Git) merge feature. You can re-create your solution with same name on aspnetzero.com, make changes in another branch and merge with your branch. As I said, I did not try it, maybe it's hard but I say it as an idea.

    I thought and discussed a lot with my friends on upgrading such a project, but actually there is not a perfect solution in current world.

    Have a nice day.