{"id":25880163,"url":"https://github.com/danielmackay/directory.build.props","last_synced_at":"2026-02-26T06:39:37.329Z","repository":{"id":251820126,"uuid":"838539956","full_name":"danielmackay/Directory.Build.props","owner":"danielmackay","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-16T11:08:10.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-16T12:29:05.979Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/danielmackay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-08-05T21:16:29.000Z","updated_at":"2024-08-16T12:29:07.570Z","dependencies_parsed_at":null,"dependency_job_id":"e007b30e-09af-4ada-bae5-4d5afe00595e","html_url":"https://github.com/danielmackay/Directory.Build.props","commit_stats":null,"previous_names":["danielmackay/directory.build.props"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielmackay%2FDirectory.Build.props","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielmackay%2FDirectory.Build.props/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielmackay%2FDirectory.Build.props/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielmackay%2FDirectory.Build.props/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielmackay","download_url":"https://codeload.github.com/danielmackay/Directory.Build.props/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241512996,"owners_count":19974670,"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":"2025-03-02T13:30:59.214Z","updated_at":"2025-10-31T09:41:48.950Z","avatar_url":"https://github.com/danielmackay.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Directory.Build.props\n\nAdd global static code analysis to your .NET projects.  This avoids having to update each `.csproj` file individually.\n\n## Usage\n\nCreate a `Directory.Build.props` file in the root of your solution:\n\n```xml\n\u003cProject\u003e\n    \u003cPropertyGroup\u003e\n        \u003cTargetFramework\u003enet8.0\u003c/TargetFramework\u003e\n        \u003cImplicitUsings\u003eenable\u003c/ImplicitUsings\u003e\n        \u003cNullable\u003eenable\u003c/Nullable\u003e\n\n        \u003c!-- Configure code analysis. --\u003e\n        \u003cAnalysisLevel\u003elatest\u003c/AnalysisLevel\u003e\n        \u003cAnalysisMode\u003eRecommended\u003c/AnalysisMode\u003e\n        \u003cTreatWarningsAsErrors Condition=\"'$(Configuration)' == 'Release'\"\u003etrue\u003c/TreatWarningsAsErrors\u003e\n        \u003cCodeAnalysisTreatWarningsAsErrors Condition=\"'$(Configuration)' == 'Release'\"\u003etrue\u003c/CodeAnalysisTreatWarningsAsErrors\u003e\n        \u003cEnforceCodeStyleInBuild\u003etrue\u003c/EnforceCodeStyleInBuild\u003e\n    \u003c/PropertyGroup\u003e\n\n    \u003c!-- SonarQube Analyzers --\u003e\n    \u003cItemGroup Condition=\"'$(MSBuildProjectExtension)' != '.dcproj'\"\u003e\n        \u003cPackageReference Include=\"SonarAnalyzer.CSharp\" Version=\"*\"\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\u003c/Project\u003e\n```\n\n## Features\n\n- `TargetFramework` - Set the target .NET framework of all projects\n- `ImplicitUsings` - use default usings provided by .NET to keep your usings cleaner\n- `Nullable` - Reference types are non-nullably by default.  This helps to avoid null reference exceptions\n- `AnalysisLevel` - Use the latest available code analysis rules. This ensures that the code is checked against the most up-to-date standards and practices.\n- `AnalysisMode` - `Recommended` Enables most rules, but is slightly less aggressive than `All` (maximum)\n- `TreatWarningsAsErrors` - Any warnings will be promoted to errors for `Release` builds\n- `CodeAnalysisTreatWarningsAsErrors` - Code analysis warnings (CAXXXX) will be treated as errors\n- `EnforceCodeStyleInBuild` - Code analysis rules (IDEXXXX) will show as warnings\n\n## What is a `Directory.Build.props`?\n\nA Directory.Build.props file is an MSBuild file used in .NET projects to define common properties and configurations that apply to multiple projects within a directory tree. This file helps centralize the configuration and reduce redundancy by allowing you to specify settings that will be inherited by all projects under the directory where the file is located.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielmackay%2Fdirectory.build.props","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielmackay%2Fdirectory.build.props","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielmackay%2Fdirectory.build.props/lists"}