Announcing Amazon Q Developer transformation capabilities for .NET (preview)

.NET Framework, introduced in 2002, runs only on Windows and although it’s still supported, it’s no longer in active development. However, cross-platform .NET, launched in 2016, is open source, runs on Linux, and is lightweight and higher performing. It receives regular updates, with new features and performance improvements every year. By porting your .NET applications from .NET Framework to cross-platform .NET, you can migrate from Windows to Linux. As a result, you can not only take advantage of the latest innovations in the .NET platform, you can also reduce your Microsoft licensing spend.

At Amazon Web Services (AWS), we have been helping you port and modernize your .NET applications from Windows to Linux with tools such as Porting Assistant for .NET, AWS Toolkit for .NET Refactoring, and AWS Microservice Extractor for .NET.

Today, we’re announcing the public preview of new Amazon Q Developer transformation capabilities for .NET, mainframe, and VMware workloads.

In this post, I introduce you to Amazon Q Developer .NET transformation capabilities, a new generative AI–powered experience for porting your .NET Framework applications to cross-platform .NET within your integrated development environment (IDE).

Amazon Q Developer transform for .NET automatically analyzes the codebase, generates a transformation plan, and executes transformation tasks. These tasks include upgrading and replacing NuGet packages and APIs, rewriting deprecated and inefficient code components, and porting to cross-platform .NET.

Let’s see it in action!

Porting a .NET Framework application to cross-platform .NET
I’m using Visual Studio in this walkthrough because Amazon Q Developer transform for .NET is available as a Visual Studio extension. I install the latest version of AWS Toolkit with Amazon Q and sign in using the AWS IAM Identity Center credentials provided by my organization.

Getting started with AWS Toolkit with Amazon Q by connecting to IAM Identity Center

I open a .NET Framework solution that I need to port to the latest long-term support (LTS) version of supported cross-platform .NET, which is currently .NET 8. In the Solution Explorer, the option to transform is available as a context menu item for both the entire solution and individual projects. Depending on the size and complexity of the application, I can transform the entire application at once or transform the projects in the application step-by-step. In this walkthrough, I showcase the transformation of one of the projects of the solution.

I choose the context menu for one of the projects, and then choose Port Project with Amazon Q Developer.

Context menu of Solution Explorer to choose Port project with Amazon Q Developer

This opens a dialog where I choose additional projects to transform and select the target .NET version. I select .NET 8 and choose Confirm to proceed with the transformation.

Popup of Port project with Q Developer

I see the status in the Code Transformation Plan window and the progress in Amazon Q Developer Code Transformation Hub window.

Though I have selected only one project to transform, all dependent projects will also be transformed by Amazon Q Developer. The selected project and its dependent projects are combined to form a decomposable buildable unit. This is to make sure that the codebase after the transformation is in a successful build state.

Code Transformation Plan Window and AmazonQ Developer Code Transformation Hub Window

Amazon Q Developer first builds the project locally and then copies the selected code and dependencies to a secure and ephemeral sandbox environment in AWS for processing. You can use customer managed keys for encrypting your code in this environment.

Amazon Q Developer analyzes the codebase and generates a transformation plan. It then kicks off the transformation workflow and steps through the plan iteratively for each project in the transformation plan. For each project, it upgrades NuGet packages and APIs, updates the startup or runtime configuration, rewrites deprecated code, and debugs errors.

Showing transformation progress in Amazon Q Developer Code Transformation Hub

After the transformation is complete, I choose Transformation Summary by Q Developer to see the summary. I see the transformation status as succeeded. For each project, it shows Files changed, Packages updated, APIs changed, and Linux porting status. In the Linux porting status column, I can see if the project is ported automatically or needs inputs to resolve any pending issues.

Code Transformation Status as Succeeded

I can download the Linux readiness report to look into the issues that require manual resolution.

Screenshot showing download Linux readiness report

All the code changes are done in the sandbox, and I can review them before applying the updates to my local working repository. To manually review the changes done by Amazon Q Developer, I choose View Diff view and then choose Show changes for one of the files in the Amazon Q Developer Transformation Hub window.

Screnshot showing difference between updated and original code

After reviewing the changes, I choose Accept suggested changes in the Transformation Summary by Q Developer window to apply changes to my local working repository.

Screenshot showing Accept suggested changes

I can now continue to work on my local working repository to fix the pending issues in the Linux readiness report and then use the same steps to transform the remaining projects iteratively.

Things to know

  • Availability – Amazon Q Developer transformation capabilities for .NET porting are available today in preview with Amazon Q Developer Pro Tier subscription.
  • .NET versions supported – Amazon Q Developer transformation capabilities for .NET supports transforming applications written using .NET Framework versions 3.5+, .NET Core 3.1, and .NET 5+ to the currently supported cross-platform .NET versions such as .NET 8 and .NET 9.
  • Application types supported – Amazon Q Developer transformation capabilities for .NET supports porting C# code projects of the following types: console application, class library, unit tests, web API, Windows Communication Foundation (WCF) service, and business logic layers of Model View Controller (MVC) and Single Page Application (SPA). However, the UI layer such as Razor Views and WebForms are not ported. Also, only the projects with Microsoft authored NuGet package dependencies are supported. For .NET Framework applications dependent on Internet Information Server (IIS), only default IIS configurations are supported for porting to cross-platform .NET.

To get started, install AWS Toolkit for Visual Studio and follow instructions in the documentation to port and upgrade your .NET applications.

Prasad

from AWS News Blog https://ift.tt/4ltRZ1F

Share this content:

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top