Skip to content

Walkthrough and binaries required for the Portability Analyzer

Notifications You must be signed in to change notification settings

OliaG/hands-on-portability

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Portability Analyzer

By Olia Gavrysh, Program Manager .NET team (email, Twitter)

Portability Analyzer helps porting applications between different .NET platforms (.NET Framework, .NET Core, .NET Standard, UWP, Xamarin) and versions. It analyzes your assemblies' references and identifies APIs that are not portable. The Portability Analyzer is offered as a Visual Studio Extension and as a stand-alone console app.

Visual Studio Extension

  1. Install the extension.

    a. Download and run Portability Analyzer installer from the Visual Studio Marketplace

    b. You can also download it from Visual Studio. Open Visual Studio, in Tools > Extensions and Updates, search for ".NET Portability Analyzer", click Download. Then click Close and close Visual Studio.

    Visual Studio Extensions and Updates window showing how to download the analyzer

  2. Select your target platforms. In Visual Studio Analyze > Portability Analyzer Settings or right-click on your solution/project and click Portability Analyzer Settings.

Portability Analyzer Settings window

  1. Run the analyzer. In Visual Studio open your application that you would like to analyze.

For this example let's download the sample source code, for which we use PowerCollections.

To analyze your entire project, right-click on your project in Solution Explorer and select Analyze Assembly Portability. To analyze only particular executable or DLL, go to the Analyze menu and select Analyze Assembly Portability. From there, select what you'd like to analyze.

  1. Study the results. To look at the .NET Portability Report click on Open Report in Portability Analysis Results window.

Portability Analysis Results showing the generated report file

To navigate to the not supported APIs in your code, in Error List window double-click on the information massages.

Visual Studio Error List window showing information messages for not supported APIs

Console App

  1. Install the tool. Download and unzip Console Portability Analyzer

  2. Select application to analyze. You can download the sample application we use here, which is Paint.NET.

  3. Analyze application. From the command prompt run the following command to analyze the assemblies in the sample_binaries directory:

C:\Downloads\ApiPort\net461\win7-x64\ApiPort.exe analyze -f C:\Downloads\sample_binaries

To analyze a specific list of .dll files, type the following command:

C:\Downloads\ApiPort\net461\win7-x64\ApiPort.exe analyze -f first.dll -f second.dll -f third.dll

You can find the portability report saved as an Excel file (.xlsx) in your current directory.

Useful links

About

Walkthrough and binaries required for the Portability Analyzer

Resources

Stars

Watchers

Forks

Packages

No packages published