Back to Devexpress

XAF0034: The Copy to Output Directory property of the Model.xafml file must be set to Copy always or Copy if newer

expressappframework-405603-debugging-testing-and-error-handling-code-diagnostics-xaf0034.md

latest1.4 KB
Original Source

XAF0034: The Copy to Output Directory property of the Model.xafml file must be set to Copy always or Copy if newer

  • Oct 13, 2025

Severity: Warning

XAF requires that the Copy to Output Directory of Model.xafml files is set to Copy always or Copy if newer in platform-specific (MySolution.Blazor.Server, MySolution.Win) projects. Violation of this rule may lead to Model Editor and application localization issues.

How to Fix

  1. Right-click the Model.xafml file in the Solution Explorer and select “Properties”.

  2. Set the Copy to Output Directory property to “Copy always”.

How to Suppress this Warning

Refer to the following Microsoft article to learn how to suppress warning messages for a specific project: How to: Suppress compiler warnings.

To suppress warning messages for all projects in a solution, follow the steps below:

  1. Open the “Directory.Build.props” file or create it in the root directory of your solution. For more information, refer to the following article: Customize your build: Directory.Build.props and Directory.Build.targets.
  2. In the NoWarn section, specify codes of warnings that you want to suppress. Use semicolons to separate codes: