.Net 6 in Production: Same Same, but Different

As the final post of the series on our .Net 6 migration, we look at our experience of running our new .Net 6 application in production. You can find the other parts of the mini-series here:

  1. The Challenging Endeavour of a .Net 6 Migration
  2. 10 Unpleasant Surprises When Migrating From .Net 4.8 to .Net 6
  3. .Net 6 in Production: Same Same, but Different

 

Go-live without troubles

The initial deployment to production worked much smoother than expected. We only missed one configuration value and needed to install the .Net SDK on one more machine, everything else worked right away. In no time we had the first users on our application, and they could get their work done without any difficulties.

Over the first few days we found some minor problems like the parsing of DateTime with the American date format. As it turned out, in .Net 6 we need to define a specific model binder for DateTime?, the nullable type of DateTime. We could clear the errors in our log quickly and within a week everything worked as smoothly as it did with .Net 4.8.

Some more tiny differences between the .Net versions showed up, but they could be addressed quickly.

 

JavaScript errors and warnings

After we got through the .Net errors, we had the time to address the warnings and problems with JavaScript. This category of problems increased significantly, and it took us weeks of painstaking bug hunts to track the elusive JavaScript errors down.

We noticed a gap in our tooling and had to add Clarity to track the users to figure out what they did before they run into a JavaScript error. Seeing what was going on in the session helped us a lot and we could adjust our UI widgets to work much better with the different browsers of our users.

We are now in a much better position and got rid of most problems. The problems that persist are rare occurrences of old browser versions with outdated add-ons. As those systems get updated, our errors reduce even more.

 

Running the .Net 6 application

Besides the initial bug hunt, there is no big difference from running our application on .Net 4.8 or on .Net 6. With our well-known tooling in place, we had no need to change much in the operating procedures. We still happily deploy with Octopus and use Seq to dig through the log messages.

 

Extending the .Net 6 application

Writing code to add new features and changing the application is not much different from .Net 4.8. However, for .Net 6 we find a lot more current documentation and examples that work right out of the box, what reduces the friction for development.

A nice side effect of working with a current .Net version is that we can go to any .Net workshop or watch any current course on Pluralsight, and we find yourself at home – at least technology-wise. We can directly use the things we learn and no longer need to find a comparable solution for .Net 4.8.

 

Yet to be done: SSIS

The only remining part of our big application is the data synchronisation with SQL Server Integration Services. While there is now a new extension for Visual Studio 2023, it does not yet offer the necessary functionality to automate the creation of the synchronisation packages. Therefore, we could not yet migrate that part and we eagerly await a more stable release from Microsoft.

 

Conclusion

For a big application as ours, the migration for .Net 6 needs a lot of planning. Only then can you get the job done quickly and without interfering with your users. Unit tests are necessary, but only in combination with the environment will you detect framework-related problems. Therefore, make sure that you have a good set of end-to-end tests and plan for enough exploratory testing sessions to weed out the tricky problems.

We learned a lot about ASP.Net Core that helped us to migrate our smaller applications. For them we could skip a lot of the planning and repeat the migration steps we already know. Yet not even for those small applications was the .Net Upgrade Assistant of any use.

If you are still running .Net 4.8 applications, I suggest you start planning your migration. The gap to the current version will only increase and make the migration harder. Good Luck.

1 thought on “.Net 6 in Production: Same Same, but Different”

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.