Are your Windows Forms and WPF applications ready for .NET Core 3.0?
Download Portability Analyzer (2.37 MB)
At Build 2018 we announced that we are enabling Windows desktop applications (Windows Forms and Windows Presentation Framework (WPF)) with .NET Core 3.0. You will be able to run new and existing Windows desktop applications on .NET Core and enjoy all the benefits that .NET Core has to offer, such as application-local deployment and improved performance.
We want to make sure that .NET Core 3.0 includes all the APIs that your applications depend on. So, in order to learn about which APIs are being used, we are releasing Portability Analyzer that will report the set of APIs referenced in your apps that are not yet available in NET Core 3.0. This API list will be sent to Microsoft and will help us prioritize which APIs we should incorporate to the product before it ships.
Please download and run the tool (PortabilityAnalyzer.exe) on your Windows Forms and WPF apps to see how ready your apps are for .NET Core 3.0 and to help us shape the .NET Core 3.0 API set.
The Portability Analyzer is an open source tool that simplifies your porting experience by identifying APIs that are not portable among the various .NET Platforms. This tool has existed for a few years as a console application and a Visual Studio extension. We recently updated it with a Windows Forms UI, which you can find here. You can see what it looks like in the following image.
Running the tool will do two things:
- Generate an Excel spreadsheet that will report the level of compatibility that your project has with .NET Core 3.0, including the specific APIs that are currently unsupported.
- Send this same data to the .NET team at Microsoft so that we can determine which APIs are needed by the most people.
The data we are collecting is the same as what is in the spreadsheet. None of your source code or binaries will be sent from your machine to Microsoft.
In order for us to know which APIs our users need, we are asking you to run the tool which will help us to provide the best possible experience in porting your apps. You, at the same time, will see how portable your apps are right now since the tool generates a list of APIs referenced in your assemblies, that might not be supported in .NET Core 3.0.
We will prioritize adding new APIs in .NET Core 3.0 based on information we collect. Please help us help you by making sure your application’s API requirements are represented in the data that we use for prioritization. Please run the Portability Analyzer to ensure that your application is counted.
Use the following instructions to run Portability Analyzer.
- Extract archive anywhere on your local disk.
- Run PortabilityAnalyzer.exe
- In the Path to application text box enter the directory path to your Windows Forms or WPF app (either by inserting a path string or clicking on Browse button and navigating to the folder).
- Click Analyze button.
- After the analysis is complete, a report of how portable your app is right now to .NET Core 3.0 will be saved to your disc. You can open it in Excel by clicking Open Report button.
Below is an example of the report you’re getting after running the tool for the popular Paint.NET application:
Note: In your report you might have a tab “Missing Assemblies”. It means that the analyzer could not find the source assemblies that are referenced in your application. Make sure to find those assemblies and add them to the folder you’re analyzing. Otherwise you won’t get the full picture of your application.
Currently Portability Analyzer cannot analyze resource assemblies (*..resources.dll). This results in the error message:
Unable to analyze.
Detecting assembly references [Failed]
Cannot locate assembly information for System.Object. Microsoft assemblies found are:
We are working on providing a fix. To unblock analysis until the fix is available, you can remove resource files from the folder you are analyzing.
If you would like to run the analysis for many applications, you can either run them one by one as described above or you can use the console version of the Portability Analyzer.
Note: You will get one report per invocation of the ApiPort.exe tool. If you prefer to get one report per application, you can automate the invocation either using
for in Batch or the
ForEach mechanism in PowerShell.
To run the console app:
- Download and unzip Console Portability Analyzer.
- From the command prompt run the following command specifying multiple directories, dlls, or executables:
You can find the portability report saved as an Excel file (
.xlsx) in your current directory.
Please download and use Portability Analyzer on your desktop applications. It will help you determine how compatible your apps are with .NET Core 3.0. This information will help us plan the 3.0 release with the goal of making it easy for you to adopt .NET Core 3.0 for desktop apps.
Download Portability Analyzer (2.37 MB)
Thank you in advance for your help!