{"id":13594263,"url":"https://github.com/dotnet/try-convert","last_synced_at":"2025-10-19T08:32:05.729Z","repository":{"id":37663846,"uuid":"209180058","full_name":"dotnet/try-convert","owner":"dotnet","description":"Helping .NET developers port their projects to .NET Core!","archived":true,"fork":false,"pushed_at":"2024-05-17T05:13:32.000Z","size":2218,"stargazers_count":1146,"open_issues_count":65,"forks_count":153,"subscribers_count":47,"default_branch":"main","last_synced_at":"2024-10-29T17:12:15.151Z","etag":null,"topics":["csharp","dotnet","dotnetcore","msbuild","winforms","wpf"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dotnet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.TXT","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-18T00:14:38.000Z","updated_at":"2024-10-26T03:10:57.000Z","dependencies_parsed_at":"2024-05-28T17:14:01.136Z","dependency_job_id":"1f68a919-c448-4c12-af52-bd3b7b209e4b","html_url":"https://github.com/dotnet/try-convert","commit_stats":{"total_commits":774,"total_committers":37,"mean_commits":20.91891891891892,"dds":0.5439276485788114,"last_synced_commit":"e77da83926191bf6dad0ee0d22d0a216b4cb39f7"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnet%2Ftry-convert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnet%2Ftry-convert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnet%2Ftry-convert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnet%2Ftry-convert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dotnet","download_url":"https://codeload.github.com/dotnet/try-convert/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237092811,"owners_count":19254281,"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":["csharp","dotnet","dotnetcore","msbuild","winforms","wpf"],"created_at":"2024-08-01T16:01:30.991Z","updated_at":"2025-10-19T08:32:04.025Z","avatar_url":"https://github.com/dotnet.png","language":"C#","readme":"# try-convert  [![NuGet Badge](https://buildstats.info/nuget/try-convert)](https://www.nuget.org/packages/try-convert/)\n\nThis is a simple tool that will help in migrating .NET Framework projects to .NET Core.\n\n## How to use it\n\nInstall it as a global tool here:\n\n```\ndotnet tool install -g try-convert\n```\n\nIf you already have it installed, make sure to update:\n\n```\ndotnet tool update -g try-convert\n```\n\nIf you're using the tool again, make sure you've got the latest release: https://github.com/dotnet/try-convert/releases\n\n## How to use the tool\n\nNagivate to the root of your solution and simply execute:\n\n```console\ntry-convert\n```\n\nAlternatively, you can do\n\n```console\ntry-convert -w .\n```\n\nIf you only want to convert a specific subfolder, solution, or project, type:\n\n```console\ntry-convert -w path-to-folder-or-solution-or-project\n```\n\nIf you want more help from the tool, run:\n\n```console\ntry-convert -h\n```\n\nBecause this is for converting older .NET Framework (Windows) projects, the tool only works on Windows.\n\n**NOTE:** Do not use this tool from the Visual Studio developer command prompt. There is special MSBuild resolution that happens there and it ends up being incompatible with the tool. Please use a normal terminal application.\n\n## Status\n\n| |Unit Tests (Debug)|Unit Tests (Release)|\n|---|:--:|:--:|\n| ci |[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/try-convert/try-convert-ci?branchName=main\u0026jobName=Windows_NT\u0026configuration=Windows_NT%20Debug\u0026label=main)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=616\u0026branchName=main)|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/try-convert/try-convert-ci?branchName=main\u0026jobName=Windows_NT\u0026configuration=Windows_NT%20Release\u0026label=main)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=616\u0026branchName=main)|\n| official | [![Build Status](https://dev.azure.com/dnceng/internal/_apis/build/status/dotnet/try-convert/try-convert-official?branchName=main\u0026jobName=Windows_NT\u0026configuration=Windows_NT%20Debug\u0026label=main)](https://dev.azure.com/dnceng/internal/_build/latest?definitionId=615\u0026branchName=main)|[![Build Status](https://dev.azure.com/dnceng/internal/_apis/build/status/dotnet/try-convert/try-convert-official?branchName=main\u0026jobName=Windows_NT\u0026configuration=Windows_NT%20Release\u0026label=main)](https://dev.azure.com/dnceng/internal/_build/latest?definitionId=615\u0026branchName=main)|\n\n## How to build\n\nSimple: clone the repo and run\n\n```\nbuild.cmd\n```\n\nTo use the tool locally, you need to build it from source. Once it's built, the tool will live under:\n\n```\n/artifacts/bin/try-convert/Debug/net6.0/try-convert.exe\n```\n\nAlternatively, you can look at the following directory and copy that into somewhere else on your machine:\n\n```\nmv /artifacts/bin/try-convert/Debug/net6.0/publish C:/Users/\u003cuser\u003e/try-convert\n```\n\nYou can invoke the tool from the publish directory as well.\n\n## Support policy\n\n**This tool is not supported in any way.** Nobody will be on the hook for fixing any issues with it, nor is anyone who builds this tool obliged to add any requested features.\n\nThis is an open source project built by members of the .NET team in their spare time. Although we'll strive to fix issues and add features if people ask for them, the default answer to any issue filed will be, \"we'll review a pull request that implements this\".\n\n## Who is this tool for?\n\nThis tool is for anyone looking to get a little help migrating their projects to .NET Core (or .NET SDK-style projects).\n\nAs the name suggests, this tool is not guaranteed to fully convert a project into a 100% working state. The tool is conservative and does as good of a job as it can to ensure that a converted project can still be loaded into Visual Studio and build. However, there are an enormous amount of factors that can result in a project that may not load or build that this tool explicitly does not cover. These include:\n\n* Complex, custom builds that you may have in your solution\n* API usage that is incompatible with .NET Core\n* Unsupported project types (such as Xamarin, WebForms, or WCF projects)\n\nIf the bulk of your codebase is generally capable of moving to .NET Core (such as lots of class libraries with no platform-specific code), then this tool should help quite a bit.\n\nIt is highly recommended that you use this tool on a project that is under source control.\n\n## What does the tool do?\n\nIt loads a given project and evaluates it to get a list of all properties and items. It then replaces the project in memory with a simple .NET SDK based template and then re-evaluates it.\n\nIt does the second evaluation in the same project folder so that items that are automatically picked up by globbing will be known as well. It then applies rules about well-known properties and items, finally producing a diff of the two states to identify the following:\n\n* Properties that can now be removed from the project because they are already implicitly defined by the SDK and the project had the default value\n* Properties that need to be kept in the project either because they override the default or are not defined in the SDK.\n* Items that can be removed because they are implicitly brought in by globs in the SDK\n* Items that need to be changed to the `Update` syntax because although they're brought in by the SDK, there is extra metadata being added.\n* Items that need to be kept because they are are not implicit in the SDK.\n\nThis diff is used to convert a given project file.\n\n## Attribution\n\nThis tool is based on the work of [Srivatsn Narayanan](https://github.com/srivatsn) and his [ProjectSimplifier](https://github.com/srivatsn/ProjectSimplifier) project.\n","funding_links":[],"categories":["C#","C\\#","🗒️ Cheatsheets"],"sub_categories":["📦 Libraries"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotnet%2Ftry-convert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdotnet%2Ftry-convert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotnet%2Ftry-convert/lists"}