> ## 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.

# AL0017 - Hardcoded package version detected

> Package versions should use MSBuild variables from Version.props for centralized version management

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

## Description

Package versions should use MSBuild variables from Version.props for centralized version management. This ensures consistency across all projects and simplifies version updates.

## Bad Code

```xml theme={null}
<PackageVersion Include="Pkg" Version="1.0.0" />
```

## Good Code

```xml theme={null}
<PackageVersion Include="Pkg" Version="$(PkgVersion)" />
```

## Properties

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

## Configuration

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