-
Notifications
You must be signed in to change notification settings - Fork 0
02 02 Directory Build Props
Cyberdyne Development edited this page Dec 29, 2025
·
2 revisions
The Directory.Build.props file provides shared MSBuild properties for all projects in the solution.
From Directory.Build.props:
<Project>
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>preview</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
<PropertyGroup>
<RootNamespace>$(MSBuildProjectName)</RootNamespace>
<AssemblyName>$(MSBuildProjectName)</AssemblyName>
</PropertyGroup>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<!-- Local NuGet Development Configuration -->
<PropertyGroup>
<!-- Default config filename - can be overridden in project files -->
<LocalNugetConfigFileName Condition="'$(LocalNugetConfigFileName)' == ''">Fdw.Local.nuget.config</LocalNugetConfigFileName>
</PropertyGroup>
<!-- Use local NuGet config when LocalNugetFolder is set and not in Release -->
<PropertyGroup Condition="'$(Configuration)' != 'Release' AND '$(LocalNugetFolder)' != ''">
<RestoreConfigFile>$(LocalNugetFolder)\$(LocalNugetConfigFileName)</RestoreConfigFile>
</PropertyGroup>
</Project><TargetFramework>net10.0</TargetFramework>All projects target .NET 10.
<Nullable>enable</Nullable>Enables nullable reference type analysis across all projects.
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>Treats all warnings as errors to ensure code quality.
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>Enables central package version management. See Package Management.
From Directory.Build.props:21-30:
<!-- Local NuGet Development Configuration -->
<PropertyGroup>
<!-- Default config filename - can be overridden in project files -->
<LocalNugetConfigFileName Condition="'$(LocalNugetConfigFileName)' == ''">Fdw.Local.nuget.config</LocalNugetConfigFileName>
</PropertyGroup>
<!-- Use local NuGet config when LocalNuGetFolder is set and not in Release -->
<PropertyGroup Condition="'$(Configuration)' != 'Release' AND '$(LocalNugetFolder)' != ''">
<RestoreConfigFile>$(LocalNugetFolder)\$(LocalNugetConfigFileName)</RestoreConfigFile>
</PropertyGroup>This configuration enables local NuGet package development by pointing to a local feed when LocalNugetFolder is set and the build configuration is not Release.
- Package Management - Central version control
- Naming Conventions - Project naming patterns
- Local Package Development - Working with local NuGet packages