1. Home
  2. Docs
  3. Getting Started
  4. Installation
  5. How to Upgrade

How to Upgrade

Upgrading Dotnet Report Builder is a straightforward process that involves updating your NuGet package and managing any custom changes you’ve made to the files. This guide walks you through the steps, ensuring that your upgrades are seamless while preserving the customizations important to your project.

Step 1: Commit Your Changes to Git

Before starting the upgrade process, it’s crucial to commit your current codebase to Git. This ensures that you have a backup of your existing code and allows you to easily compare changes after the upgrade.

  • Open your project in Visual Studio (or your preferred IDE).
  • Commit all current changes to Git.

This step creates a reference point that you can return to if needed.

Step 2: Install the Updated NuGet Package

Now, it’s time to install the latest version of the Dotnet Report Builder NuGet package. This will overwrite most of the files with their updated versions.

  • Open NuGet Package Manager in Visual Studio.
  • Search for the appropriate Dotnet Report package (e.g., dotnetreport, dotnetreport.core, dotnetreport.mvc, or dotnetreport.aspx).
  • Install or update to the latest version of the package.

The updated package will replace the relevant controllers, views, and scripts in your project.

Step 3: Compare Changes in Git

Once the new package is installed, it’s important to review and compare the changes against your previous version to ensure that custom modifications are preserved. Most of the time, you’ll only want to retain changes to a few specific files.

  • Open your Git tool (such as Git in Visual Studio or another Git client) and view the comparison between the current state and your previous commit.

Focus on these areas for comparison:

  • API Controllers: The GetSettings method in the API controller is commonly customized. Be sure to review and retain any changes you’ve made to this method.
  • View Files: If you’ve made any changes to the view files (e.g., custom styling, additional UI components), you’ll want to retain those as well. Manually merge the changes or keep your custom views as needed.

For most other files, it’s safe to overwrite them with the updated versions from the NuGet package, as they usually contain bug fixes or new features that won’t affect your custom code.

Step 4: Test Your Application

Once you’ve completed the comparison and applied the necessary changes:

  • Build and run your application to ensure that everything is functioning correctly after the upgrade.
  • Verify that your customizations, such as API settings and view modifications, are still working as expected.

Step 5: Commit the Updated Code

After confirming that everything works smoothly, commit the updated code along with any merges or customizations you kept during the comparison process.

  • Commit your changes to Git and push them to the remote repository to keep a record of the upgrade and the adjustments you made.

Conclusion

Upgrading Dotnet Report Builder is a simple process, but attention to detail is important when preserving custom changes. By following the steps above—committing your code, installing the new package, and carefully comparing your changes—you can ensure a smooth upgrade while maintaining the integrity of your project’s customizations.


How can we help?