XAF0006: Invalid target platform. Change the target platform to "Any CPU" in the project or solution properties
Severity: Warning
The Model Editor for .NET projects requires that the project target platform is Any CPU
. If the project platform is not Any CPU
, you cannot invoke the Model Editor for this project.
How to Fix
Use one of the following techniques to fix this warning:
In the Project Properties
Right-click the project in the Solution Explorer and select “Properties”.
Navigate to the Build tab and set the Platform target property to “Any CPU”.
In the Solution Properties
- In Visual Studio, click the Build | Configuration Manager… menu item.
- Set the project’s platform to “Any CPU”.
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:
- 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.
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>