{"id":18603007,"url":"https://github.com/devlooped/packagereferencecleaner","last_synced_at":"2025-04-10T19:31:22.540Z","repository":{"id":147554697,"uuid":"618929313","full_name":"devlooped/PackageReferenceCleaner","owner":"devlooped","description":"Clean your PackageReferences with PrivateAssets=all into beautiful one-liners, automatically","archived":false,"fork":false,"pushed_at":"2025-03-18T00:18:20.000Z","size":529,"stargazers_count":2,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T03:34:06.656Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/devlooped.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"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},"funding":{"github":"devlooped"}},"created_at":"2023-03-25T18:56:27.000Z","updated_at":"2025-02-08T06:16:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"ce3a6599-cd0e-4611-8eae-e88ae270c3f8","html_url":"https://github.com/devlooped/PackageReferenceCleaner","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devlooped%2FPackageReferenceCleaner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devlooped%2FPackageReferenceCleaner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devlooped%2FPackageReferenceCleaner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devlooped%2FPackageReferenceCleaner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devlooped","download_url":"https://codeload.github.com/devlooped/PackageReferenceCleaner/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248281400,"owners_count":21077423,"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":[],"created_at":"2024-11-07T02:13:12.562Z","updated_at":"2025-04-10T19:31:17.528Z","avatar_url":"https://github.com/devlooped.png","language":"C#","funding_links":["https://github.com/sponsors/devlooped","https://github.com/sponsors"],"categories":[],"sub_categories":[],"readme":"# PackageReference Cleaner\n\nCleans the following crazy NuGet package reference mess:\n\n```xml\n\u003cItemGroup\u003e\n  \u003cPackageReference Include=\"Microsoft.CodeAnalysis.CSharp\" Version=\"4.3.1\" Pack=\"false\" /\u003e\n  \u003cPackageReference Include=\"Microsoft.SourceLink.GitHub\" Version=\"1.1.1\"\u003e\n    \u003cPrivateAssets\u003eall\u003c/PrivateAssets\u003e\n    \u003cIncludeAssets\u003eruntime; build; native; contentfiles; analyzers; buildtransitive\u003c/IncludeAssets\u003e\n  \u003c/PackageReference\u003e\n  \u003cPackageReference Include=\"NuGetizer\" Version=\"1.0.1\"\u003e\n    \u003cPrivateAssets\u003eall\u003c/PrivateAssets\u003e\n    \u003cIncludeAssets\u003eruntime; build; native; contentfiles; analyzers; buildtransitive\u003c/IncludeAssets\u003e\n  \u003c/PackageReference\u003e\n  \u003cPackageReference Include=\"PolySharp\" Version=\"1.12.1\"\u003e\n    \u003cPrivateAssets\u003eall\u003c/PrivateAssets\u003e\n    \u003cIncludeAssets\u003eruntime; build; native; contentfiles; analyzers; buildtransitive\u003c/IncludeAssets\u003e\n  \u003c/PackageReference\u003e\n  \u003cPackageReference Include=\"ThisAssembly.AssemblyInfo\" Version=\"1.2.12\"\u003e\n    \u003cPrivateAssets\u003eall\u003c/PrivateAssets\u003e\n    \u003cIncludeAssets\u003eruntime; build; native; contentfiles; analyzers; buildtransitive\u003c/IncludeAssets\u003e\n  \u003c/PackageReference\u003e\n  \u003cPackageReference Include=\"ThisAssembly.Git\" Version=\"1.2.12\"\u003e\n    \u003cPrivateAssets\u003eall\u003c/PrivateAssets\u003e\n    \u003cIncludeAssets\u003eruntime; build; native; contentfiles; analyzers; buildtransitive\u003c/IncludeAssets\u003e\n  \u003c/PackageReference\u003e\n  \u003cPackageReference Include=\"GitInfo\" Version=\"3.0.5\"\u003e\n    \u003cPrivateAssets\u003eall\u003c/PrivateAssets\u003e\n    \u003cIncludeAssets\u003eruntime; build; native; contentfiles; analyzers; buildtransitive\u003c/IncludeAssets\u003e\n  \u003c/PackageReference\u003e\n\u003c/ItemGroup\u003e\n```\n\nInto this perfectly clean and 100% equivalent beauty:\n\n```xml\n\u003cItemGroup\u003e\n  \u003cPackageReference Include=\"Microsoft.CodeAnalysis.CSharp\" Version=\"4.3.1\" Pack=\"false\" /\u003e\n  \u003cPackageReference Include=\"Microsoft.SourceLink.GitHub\" Version=\"1.1.1\" PrivateAssets=\"all\" /\u003e\n  \u003cPackageReference Include=\"NuGetizer\" Version=\"1.0.1\" PrivateAssets=\"all\" /\u003e\n  \u003cPackageReference Include=\"PackageReferenceCleaner\" Version=\"1.0.0\" PrivateAssets=\"all\" /\u003e\n  \u003cPackageReference Include=\"PolySharp\" Version=\"1.12.1\" PrivateAssets=\"all\" /\u003e\n  \u003cPackageReference Include=\"ThisAssembly.AssemblyInfo\" Version=\"1.2.12\" PrivateAssets=\"all\" /\u003e\n  \u003cPackageReference Include=\"ThisAssembly.Git\" Version=\"1.2.12\" PrivateAssets=\"all\" /\u003e\n  \u003cPackageReference Include=\"GitInfo\" Version=\"3.0.5\" PrivateAssets=\"all\" /\u003e\n\u003c/ItemGroup\u003e\n```\n\n## How it works\n\nA diagnostic analyzer inspects the MSBuild project file looking for \n`\u003cPackageReference\u003e` with `PrivateAssets=all` (via inner element or \nattribute), removes all its child nodes and moves (if necessary) the \n`PrivateAssets` child element to an attribute.\n\nThis is done automatically whenever the analyzer runs, and nothing \nis saved unless a node was cleaned.\n\n\u003c!-- include https://github.com/devlooped/sponsors/raw/main/footer.md --\u003e\n# Sponsors \n\n\u003c!-- sponsors.md --\u003e\n[![Clarius Org](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/clarius.png \"Clarius Org\")](https://github.com/clarius)\n[![Christian Findlay](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/MelbourneDeveloper.png \"Christian Findlay\")](https://github.com/MelbourneDeveloper)\n[![C. Augusto Proiete](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/augustoproiete.png \"C. Augusto Proiete\")](https://github.com/augustoproiete)\n[![Kirill Osenkov](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/KirillOsenkov.png \"Kirill Osenkov\")](https://github.com/KirillOsenkov)\n[![MFB Technologies, Inc.](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/MFB-Technologies-Inc.png \"MFB Technologies, Inc.\")](https://github.com/MFB-Technologies-Inc)\n[![SandRock](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/sandrock.png \"SandRock\")](https://github.com/sandrock)\n[![Eric C](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/eeseewy.png \"Eric C\")](https://github.com/eeseewy)\n[![Andy Gocke](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/agocke.png \"Andy Gocke\")](https://github.com/agocke)\n\n\n\u003c!-- sponsors.md --\u003e\n\n[![Sponsor this project](https://raw.githubusercontent.com/devlooped/sponsors/main/sponsor.png \"Sponsor this project\")](https://github.com/sponsors/devlooped)\n\u0026nbsp;\n\n[Learn more about GitHub Sponsors](https://github.com/sponsors)\n\n\u003c!-- https://github.com/devlooped/sponsors/raw/main/footer.md --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevlooped%2Fpackagereferencecleaner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevlooped%2Fpackagereferencecleaner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevlooped%2Fpackagereferencecleaner/lists"}