{"id":20632,"date":"2018-08-08T10:00:25","date_gmt":"2018-08-08T17:00:25","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/dotnet\/?p=18635"},"modified":"2019-09-11T18:18:56","modified_gmt":"2019-09-12T01:18:56","slug":"are-your-windows-forms-and-wpf-applications-ready-for-net-core-3-0","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/are-your-windows-forms-and-wpf-applications-ready-for-net-core-3-0\/","title":{"rendered":"Are your Windows Forms and WPF applications ready for .NET Core 3.0?"},"content":{"rendered":"<p><a href=\"https:\/\/github.com\/Microsoft\/dotnet-apiport-ui\/releases\/download\/1.1\/PortabilityAnalyzer.zip\"><img decoding=\"async\" style=\"max-width: 100%;\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/10\/2019\/02\/download-icon.png\" alt=\"Download\" \/><\/a> <a href=\"https:\/\/github.com\/Microsoft\/dotnet-apiport-ui\/releases\/download\/1.1\/PortabilityAnalyzer.zip\"><strong>Download Portability Analyzer<\/strong><\/a> <strong>(2.37 MB)<\/strong><\/p>\n<p>At Build 2018 we\u00a0<a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/net-core-3-and-support-for-windows-desktop-applications\/\" rel=\"nofollow\">announced<\/a>\u00a0that 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.<\/p>\n<p>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.<\/p>\n<p>Please\u00a0<a href=\"https:\/\/github.com\/Microsoft\/dotnet-apiport-ui\/releases\/download\/1.1\/PortabilityAnalyzer.zip\">download<\/a>\u00a0and run the tool (<em>PortabilityAnalyzer.exe<\/em>) 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.<\/p>\n<h2><a id=\"user-content-introducing-portability-analyzer\" class=\"anchor\" href=\"https:\/\/github.com\/Microsoft\/#introducing-portability-analyzer\"><\/a>The Portability Analyzer<\/h2>\n<p>The Portability Analyzer is an\u00a0<a href=\"https:\/\/github.com\/Microsoft\/dotnet-apiport\">open source tool<\/a>\u00a0that 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\u00a0<a href=\"https:\/\/github.com\/Microsoft\/dotnet-apiport\/blob\/master\/docs\/Console\/README.md\">console application<\/a> and a\u00a0<a href=\"https:\/\/github.com\/Microsoft\/dotnet-apiport\/blob\/master\/docs\/VSExtension\/README.md\">Visual Studio extension<\/a>. We recently updated it with a Windows Forms UI, which you can find <a href=\"https:\/\/github.com\/microsoft\/dotnet-apiport-ui\">here<\/a>. You can see what it looks like in the following image.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/10\/2019\/02\/UI.png\"><img decoding=\"async\" class=\"size-full wp-image-18705 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/10\/2019\/02\/UI.png\" alt=\"\" width=\"533\" height=\"315\" \/><\/a><\/p>\n<p>Running the tool will do two things:<\/p>\n<ol>\n<li>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.<\/li>\n<li>Send this same data to the .NET team at Microsoft so that we can determine which APIs are needed by the most people.<\/li>\n<\/ol>\n<p>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.<\/p>\n<p>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.<\/p>\n<p>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\u2019s API requirements are represented in the data that we use for prioritization. Please run the Portability Analyzer to ensure that your application is counted.<\/p>\n<h2><a id=\"user-content-using-portability-analyzer\" class=\"anchor\" href=\"https:\/\/github.com\/Microsoft\/#using-portability-analyzer\"><\/a>Using Portability Analyzer<\/h2>\n<p>Use the following instructions to run Portability Analyzer.<\/p>\n<ol>\n<li>Extract archive anywhere on your local disk.<\/li>\n<li>Run\u00a0<em>PortabilityAnalyzer.exe<\/em><\/li>\n<li>In the\u00a0<strong>Path to application<\/strong>\u00a0text box enter the directory path to your Windows Forms or WPF app (either by inserting a path string or clicking on\u00a0<strong>Browse<\/strong>\u00a0button and navigating to the folder).<\/li>\n<li>Click\u00a0<strong>Analyze<\/strong>\u00a0button.<\/li>\n<li>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\u00a0<strong>Open Report<\/strong>\u00a0button.<\/li>\n<\/ol>\n<p>Below is an example of the report you&#8217;re getting after running the tool for the popular Paint.NET application:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/10\/2019\/02\/port-report.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-18655\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/10\/2019\/02\/port-report.jpg\" alt=\"\" width=\"1749\" height=\"857\" \/><\/a><\/p>\n<p style=\"padding-left: 30px;\"><em><strong>Note:<\/strong> In your report you might have a tab &#8220;Missing Assemblies&#8221;. 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&#8217;re analyzing. Otherwise you won&#8217;t get the full picture of your application.<\/em><\/p>\n<h3>Troubleshooting<\/h3>\n<p>Currently Portability Analyzer cannot analyze resource assemblies (<em>*..resources.dll<\/em>). This results in the error message:<\/p>\n<p><em>Unable to analyze.<\/em>\n<em>Details:<\/em>\n<em>Detecting assembly references [Failed]<\/em><\/p>\n<p><em>Cannot locate assembly information for System.Object. Microsoft assemblies found are:<\/em><\/p>\n<p>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.<\/p>\n<h2><a id=\"user-content-using-the-console-based-version\" class=\"anchor\" href=\"https:\/\/github.com\/Microsoft\/#using-the-console-based-version\"><\/a>Using the console-based version<\/h2>\n<p>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.<\/p>\n<p style=\"padding-left: 30px;\"><em><strong>Note:<\/strong> 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\u00a0<code>for<\/code>\u00a0in Batch or the\u00a0<code>ForEach<\/code>\u00a0mechanism in PowerShell.<\/em><\/p>\n<p>To run the console app:<\/p>\n<ol>\n<li>Download and unzip\u00a0<a href=\"https:\/\/github.com\/Microsoft\/dotnet-apiport\/releases\/download\/2.5.0-alpha\/ApiPort.zip\">Console Portability Analyzer<\/a>.<\/li>\n<li>From the command prompt run the following command specifying multiple directories, dlls, or executables:\n<script src=\"https:\/\/gist.github.com\/terrajobst\/653024fdf01683b6144cf59d56438693.js\"><\/script>\nFor example:\n<script src=\"https:\/\/gist.github.com\/terrajobst\/2ffe85863e616db2af15de57912ce9c3.js\"><\/script><\/li>\n<\/ol>\n<p>You can find the portability report saved as an Excel file (<code>.xlsx<\/code>) in your current directory.<\/p>\n<h2><a id=\"user-content-summary\" class=\"anchor\" href=\"https:\/\/github.com\/Microsoft\/#summary\"><\/a>Summary<\/h2>\n<p>Please\u00a0<a href=\"https:\/\/github.com\/Microsoft\/dotnet-apiport-ui\/releases\/download\/1.1\/PortabilityAnalyzer.zip\">download<\/a>\u00a0and 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.<\/p>\n<p><a href=\"https:\/\/github.com\/Microsoft\/dotnet-apiport-ui\/releases\/download\/1.1\/PortabilityAnalyzer.zip\"><img decoding=\"async\" style=\"max-width: 100%;\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/10\/2019\/02\/download-icon.png\" alt=\"Download\" \/><\/a> <a href=\"https:\/\/github.com\/Microsoft\/dotnet-apiport-ui\/releases\/download\/1.1\/PortabilityAnalyzer.zip\"><strong>Download Portability Analyzer<\/strong><\/a> <strong>(2.37 MB)<\/strong><\/p>\n<p>Thank you in advance for your help!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Download Portability Analyzer (2.37 MB) At Build 2018 we\u00a0announced\u00a0that 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 [&hellip;]<\/p>\n","protected":false},"author":365,"featured_media":21773,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[196,509],"tags":[9,11,30,43,158],"class_list":["post-20632","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dotnet-core","category-wpf","tag-net-core","tag-net-framework","tag-announcement","tag-bcl","tag-wpf"],"acf":[],"blog_post_summary":"<p>Download Portability Analyzer (2.37 MB) At Build 2018 we\u00a0announced\u00a0that 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 [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/20632","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/365"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=20632"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/20632\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/21773"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=20632"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=20632"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=20632"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}