Showing posts with label .NET. Show all posts
Showing posts with label .NET. Show all posts

Thursday 7 December 2023

Upgrading Two web applications and verifying using Playwright - super fast

Overview: A couple of my internal recent projects all clipped together to allow my to upgrade two websites to .NET 8. And verify the upgrade and commit to source control in a regulated controlled manor and it took less than 30 minutes.

I download the latest version of Visual Studio 2022 Enterprise edition and noticed an option to upgrade my .NET projects, so I clicked it. The .NET Upgrade Assistant downloaded and installed upgrade in Visual Studio.  The upgrade is done using a vsix template import: Microsoft.NET.UpgradeAssistant.vsix

I thought I may as well upgrade my two current .NET projects:

1. App Service on Azure running Blazor .NET 6, using TFS for source control and published using my Visual Studio profile.

Once the upgrade was applied took 10 seconds and i chose LTS  .net8, I published.  Code is still not checked in.  I has a quick look and the  app loos to be running correctly in a browser. 

2. Static Web App hosting a Blazor .NET 6 connected to Github and published as a gated checkin using git Actions. Upgrades, and when I checked into the main github branch, the action fired and upgraded the static web app.

Verify Build:

So I had checked both apps where running using the good old open in a browser and look around.  A few days ago I was playing with Playwright and my testing covered validating the App Service website can send email, is running and text is visible, it also checks a Mendix low code website and lastly it looks at the Static Web App to validate it is service pages.  I did this is Visual Studio Code. 

The tests tell me both applications are running, verifies WAG compliance on 1 app and also checks a Mendix website is running.

Summary:  By re-using the test project I could quickly verify the project upgrades and the first project still requires a commit to complete but it is way safer than my direct to production gated checking done on the static web app.


Sunday 7 March 2021

.NET versions no longer supported

Update 1 Feb 2022:  For new projects use .NET6 (Core) it needs VS2022.  Don't use any versions of .NET framework (last release was 4.8) or .NET standard (last release was 2.0).

Problem:  The client has several existing .NET applications/products.  These products are running on Azures Service Fabric, which has been developed over several years.  Service Fabric applications have various .NET core and .NET framework versions, and many of the apps have gone out of Microsoft support for the .NET version they are written on.

Initial Hypothesis:  We have .NET framework and .NET Core apps.  .NET Core 5.0 has dropped the "Core" part of the naming, so it is merely .NET 5.   .NET framework came first, and the last version was .NET framework 4.8.  .NET Core is the follow on and .NET Core 3.1 next version has the name chnge to .NET 5.0.  The "Core" part is dropped.  Lastly, .NET Standard is often used by software companies to write dll's. Only class libraries are allowed, but any .NET framework or .NET core projects can reference them.

  • .NET Framework - 4.8 was the latest release version
  • .NET Core became .NET - Last was 3.1 but renames to .NET 5 which is the latest version
  • .NET Standard - Class projects only

Proposed Resolution: My preference is to upgrade .NET core and .NET Framework separately as this is the lowest risk, most extended life with minimized cost. 

 .NET Core

For .NET Core apps, if less than .NET core 3.1 migrate the app to .NET 5.  .NET Core 3.1 don't upgrade.  Any other versions should be upgraded to .NET 5. 

Version

Release date

Released with

Latest update

Latest update date

Support ends[20]

.NET Core 1.0

2016-06-27[21]

Visual Studio 2015 Update 3

1.0.16

2019-05-14

June 27, 2019

.NET Core 1.1

2016-11-16[22]

Visual Studio 2017 Version 15.0

1.1.13

2019-05-14

June 27, 2019

.NET Core 2.0

2017-08-14[14]

Visual Studio 2017 Version 15.3

2.0.9

2018-07-10

October 1, 2018

.NET Core 2.1

2018-05-30[15]

Visual Studio 2017 Version 15.7

2.1.26 (LTS)

2021-03-09

August 21, 2021

.NET Core 2.2

2018-12-04[16]

Visual Studio 2019 Version 16.0

2.2.8

2019-11-19

December 23, 2019

.NET Core 3.0

2019-09-23[23]

Visual Studio 2019 Version 16.3

3.0.3

2020-02-18

March 3, 2020

.NET Core 3.1

2019-12-03[24]

Visual Studio 2019 Version 16.4

3.1.13 (LTS)

2021-03-09

December 3, 2022

.NET 5

2020-11-10[25]

Visual Studio 2019 Version 16.8

5.0.5

2021-04-06

3 months after .NET 6 release


 
.NET Framework

For .NET Framework, anything less than .NET Framework 3.5, move to 3.5.  3.5 Framework based apps can stay on 3.5.  For app using .NET Framework 4.0 to 4.5.1 upgrade to .NET framework 4.8.  For app using .NET 4.5.2 to 4.7, stay on their versions.

Version

Existing Application Support

Target New Applications?

1.x

out of support - migrate ASAP

out of support - do not target

2.x

out of support - migrate ASAP

out of support - do not target

3.x

out of support - migrate ASAP

out of support - do not target

3.5

 Operating System (until 2029) 

Operating System (until 2029) target with caution

4.0 to 4.5.1

out of support - migrate ASAP

out of support - do not target

4.5.2 to 4.7

⚠️Operating System (mixed) - review support policy of each version

Operating System (mixed) - target with caution

4.8

 Operating System (indefinite)

 Operating System (indefinite)


.NET Standard