> ## Documentation Index
> Fetch the complete documentation index at: https://ancplua.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# AL0018 - Version.props not imported

> Directory.Build.props should import Version.props for centralized version management

Source: [AL0018VersionPropsNotImportedAnalyzer.cs](https://github.com/ANcpLua/ANcpLua.Analyzers/blob/main/src/ANcpLua.Analyzers/Analyzers/AL0018VersionPropsNotImportedAnalyzer.cs)

## Description

Version.props should be imported in Directory.Build.props to enable centralized package version management using \$(VariableName) syntax.

## Bad Code

```xml theme={null}
<!-- Directory.Build.props without Version.props import -->
<Project>
  <PropertyGroup>
    <TargetFramework>net10.0</TargetFramework>
  </PropertyGroup>
</Project>
```

## Good Code

```xml theme={null}
<!-- Directory.Build.props with Version.props import -->
<Project>
  <Import Project="Version.props" />
  <PropertyGroup>
    <TargetFramework>net10.0</TargetFramework>
  </PropertyGroup>
</Project>
```

## Properties

* **Category**: Usage
* **Severity**: Warning
* **Enabled by default**: True
* **Code fix available**: False

## Configuration

```editorconfig theme={null}
dotnet_diagnostic.AL0018.severity = warning
```
