JetBrains Rider 2025.3 Help

Code inspection: File name should match the name of the assembly

In Unity, Assembly Definition (.asmdef) files are used to define your own managed assemblies. Each .asmdef file contains a "name" property that specifies the name of the assembly.

It is a best practice (and often a requirement for clarity and proper assembly resolution) that the .asmdef filename matches the assembly name defined within it. If they differ, it can lead to confusion or issues with assembly resolution in some environments.

How to fix

Ensure that the .asmdef file on disk has the same name as the string specified in its "name" field.

// File: OldName.asmdef { "name": "NewName", "references": [], "includePlatforms": [], "excludePlatforms": [] }
// File: NewName.asmdef { "name": "NewName", "references": [], "includePlatforms": [], "excludePlatforms": [] }

You can use the Rename file to match assembly name quick-fix to automatically rename the file on disk.

26 March 2026