Skip to main content
All docs
V23.2
.NET 6.0+

XAF0007: The Build Action property of the XAFML file must be set to Embedded resource

Severity: Warning

XAF requires that the Build Action of XAFML files is set to “Embedded resource” in platform-agnostic and platform-specific Module projects. Violation of this rule may lead to Model Editor and application localization issues.

How to Fix

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

  2. Set the Build Action property to “Embedded resource”.

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:

    <Project>
      <PropertyGroup>
        <NoWarn>XAF0006;XAF0007</NoWarn>
      </PropertyGroup>
    </Project>