{"id":15710495,"url":"https://github.com/aws/porting-assistant-dotnet-client","last_synced_at":"2025-10-20T04:30:25.984Z","repository":{"id":37563327,"uuid":"294246265","full_name":"aws/porting-assistant-dotnet-client","owner":"aws","description":"The 'Porting Assistant for .NET' is a standalone compatibility analyzer that helps customers to port their .NET Framework (“.NET”) applications to .NET Core on Linux.","archived":false,"fork":false,"pushed_at":"2024-03-20T00:01:09.000Z","size":69123,"stargazers_count":143,"open_issues_count":85,"forks_count":32,"subscribers_count":18,"default_branch":"main","last_synced_at":"2025-01-28T19:48:30.851Z","etag":null,"topics":["analyzer","aws","csharp","dotnet-core"],"latest_commit_sha":null,"homepage":"https://aws.amazon.com/porting-assistant-dotnet/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aws.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-09-09T22:46:47.000Z","updated_at":"2024-12-18T10:33:51.000Z","dependencies_parsed_at":"2023-02-16T13:45:54.469Z","dependency_job_id":"7294581f-cda1-46d7-83e3-414c894ec843","html_url":"https://github.com/aws/porting-assistant-dotnet-client","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Fporting-assistant-dotnet-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Fporting-assistant-dotnet-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Fporting-assistant-dotnet-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Fporting-assistant-dotnet-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aws","download_url":"https://codeload.github.com/aws/porting-assistant-dotnet-client/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237261499,"owners_count":19281243,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analyzer","aws","csharp","dotnet-core"],"created_at":"2024-10-03T21:08:13.642Z","updated_at":"2025-10-20T04:30:25.979Z","avatar_url":"https://github.com/aws.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Porting Assistant for .NET](./logo.png \"Porting Assistant for .NET\")\n\n# Porting Assistant for .NET SDK\n![Build Test](https://github.com/aws/porting-assistant-dotnet-client/workflows/Build%20Test/badge.svg)\n \nPorting Assistant for .NET provides tools such as Porting Assistant for .NET standalone tool and Porting Assistant for .NET Visual Studio IDE Extension. Both tools provide functionality that scans .NET Framework applications and generates a .NET compatibility assessment, helping customers port their applications to Linux faster.\n \nPorting Assistant for .NET tools quickly scans .NET Framework applications to identify incompatibilities with .NET, finds known replacements, and generates detailed compatibility assessment reports. This reduces the manual effort involved in modernizing applications to Linux.\n \n**PortingAssistant.Client**  SDK package provides interfaces to analyze .NET applications, find the incompatibilities, and port applications to .NET. Please note that current support for porting is limited.\n \nFor more information about Porting Assistant and to try the tool, please refer to the documenation: https://aws.amazon.com/porting-assistant-dotnet/\n\n## Getting Started\n\n* Add the Porting Assistant NuGet package source into your Nuget configuration. \n   * [https://s3-us-west-2.amazonaws.com/aws.portingassistant.dotnet.download/nuget/index.json](https://s3-us-west-2.amazonaws.com/aws.portingassistant.dotnet.download/nuget/index.json)\n   \n* Add **PortingAssistant.Client** to your project as a Nuget Package.\n\n* Follow the example below to see how the library can be integrated into your application for analyzing and porting an application.\n\n```csharp\n   var solutionPath = \"/user/projects/TestProject/TestProject.sln\";\n   var outputPath = \"/tmp/\";\n   \n   /* Create configuration object */\n   var configuration = new PortingAssistantConfiguration();\n\n   /* Create PortingAssistatntClient object */\n   var portingAssistantBuilder = PortingAssistantBuilder.Build(configuration, logConfig =\u003e logConfig.AddConsole());\n\n   var portingAssistantClient = portingAssistantBuilder.GetPortingAssistant();\n\n   /* For exporting the assessment results into a file */\n   var reportExporter = portingAssistantBuilder.GetReportExporter();\n\n   var analyzerSettings = new AnalyzerSettings\n   {\n       TargetFramework = \"netcoreapp3.1\",\n    };\n\n   /* Analyze the solution */\n   var analyzeResults =  await portingAssistantClient.AnalyzeSolutionAsync(solutionPath, analyzerSettings);\n\n   /* Generate JSON output */\n   reportExporter.GenerateJsonReport(analyzeResults, outputPath);\n   \n\n   var filteredProjects = new List\u003cstring\u003e {\"projectname1\", \"projectname2\"};\n\n   /* Porting the application to .NET project */\n   var projects = analyzeResults.SolutionDetails.Projects.Where(p =\u003e !filteredProjects.Contains(p.ProjectName)).ToList();\n   var PortingProjectResults = analyzeResults.ProjectAnalysisResults\n       .Where(project =\u003e !filteredProjects.Contains(project.ProjectName));\n\n   var FilteredRecommendedActions = PortingProjectResults\n       .SelectMany(project =\u003e project.PackageAnalysisResults.Values\n       .Where(package =\u003e\n       {\n            var comp = package.Result.CompatibilityResults.GetValueOrDefault(analyzerSettings.TargetFramework);\n            return comp.Compatibility != Compatibility.COMPATIBLE \u0026\u0026 comp.CompatibleVersions.Count != 0;\n        })\n        .SelectMany(package =\u003e package.Result.Recommendations.RecommendedActions));\n\n   var portingRequest = new PortingRequest\n   {\n       Projects = projects, //By default all projects are ported\n       SolutionPath = solutionPath,\n       TargetFramework = analyzerSettings.TargetFramework,\n       RecommendedActions = FilteredRecommendedActions.ToList(),\n       IncludeCodeFix = true\n   };\n\n   var portingResults =  portingAssistantClient.ApplyPortingChanges(portingRequest);\n\n   /* Generate JSON output */\n   reportExporter.GenerateJsonReport(portingResults, solutionPath, outputPath);          \n```\n\n## Getting Help\n\nPlease use these community resources for getting help. We use the GitHub issues\nfor tracking bugs and feature requests.\n\n* If it turns out that you may have found a bug,\n  please open an [issue](https://github.com/aws/porting-assistant-dotnet-client/issues/new)\n  \n* Send us an email to: aws-porting-assistant-support@amazon.com\n  \n## How to use this code?\n* Clone the Git repository.\n* Load the solution `PortingAssistant.Client.sln` using Visual Studio or Rider. \n* Create a \"Run/Debug\" Configuration for the \"PortingAssistant.Client\" project.\n* Provide command line arguments for a solution path and output path, then run the application.\n\n## Other Packages\n[Codelyzer](https://github.com/aws/codelyzer): Porting Assistant uses Codelyzer to get package and API information used for finding compatibilities and replacements.\n\n[Porting Assistant for .NET Datastore](https://github.com/aws/porting-assistant-dotnet-datastore): The repository containing the data set and recommendations used in compatibility assessment.\n\n[Code translation assistant](https://github.com/aws/cta): The repository used to apply code translations\n\n\n## Contributing\n* [Adding Recommendations](https://github.com/aws/porting-assistant-dotnet-datastore/blob/master/RECOMMENDATIONS.md)\n\n* We welcome community contributions and pull requests. See\n[CONTRIBUTING](./CONTRIBUTING.md) for information on how to set up a development\nenvironment and submit code.\n\n# Additional Resources\n \n[Porting Assistant for .NET](https://docs.aws.amazon.com/portingassistant/index.html)\n \n[AWS Developer Center - Explore .NET on AWS](https://aws.amazon.com/developer/language/net/)\nFind all the .NET code samples, step-by-step guides, videos, blog content, tools, and information about live events that you need in one place.\n \n[AWS Developer Blog - .NET](https://aws.amazon.com/blogs/developer/category/programing-language/dot-net/)\nCome see what .NET developers at AWS are up to!  Learn about new .NET software announcements, guides, and how-to's.\n\n## Thank you\n* [CsprojToVs2017](https://github.com/hvanbakel/CsprojToVs2017) - CsprojToVs2017 helps convert project files from from the legacy format to the Visual Studio 2017/2019 format.\n* [Buildalyzer](https://github.com/daveaglick/Buildalyzer) - Buildalyzer lets you run MSBuild from your own code and returns information about the project.\n* [Nuget.Client](https://github.com/NuGet/NuGet.Client) - Nuget.Client provides tools to interface with Nuget.org and parse Nuget configuration files.\n* [Portability Analyzer](https://github.com/microsoft/dotnet-apiport) - Portability Analyzer analyzes assembly files to access API compatibility with various versions of .NET. Porting Assistant for .NET makes use of recommendations and data provided by Portability Analyzer.\n* [The .NET Compiler Platform (\"Roslyn\")](https://github.com/dotnet/roslyn) - Roslyn provides open-source C# and Visual Basic compilers with rich code analysis APIs. \n* [.NET SDKs](https://dotnet.microsoft.com/) - .NET SDKs is a set of libraries and tools that allow developers to create .NET applications and libraries.\n* [THIRD-PARTY](./THIRD-PARTY) - This project would not be possible without additional dependencies listed in [THIRD-PARTY](./THIRD-PARTY).\n\n# License\n\nLibraries in this repository are licensed under the Apache 2.0 License.\n\nSee [LICENSE](./LICENSE) and [NOTICE](./NOTICE) for more information.  \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws%2Fporting-assistant-dotnet-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faws%2Fporting-assistant-dotnet-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws%2Fporting-assistant-dotnet-client/lists"}