File '<file>' targeting '<platform>' is not compatible with the project's target platform '<platform>'

This message is generated when the assembly is built to target a platform that is different from the TargetPlatform Property of the project. You can receive this message in the following cases:

  • If the project's TargetPlatform is x86, and the assembly targets x64 or Itanium.

  • If the project's TargetPlatform is x64, and the assembly targets Itanium.

  • If the Project's TargetPlatform is Itanium, and the assembly targets x64.

If your Setup project uses 64-bit DLL custom actions (regardless of the TargetPlatform you specified), this message is generated as a warning. Otherwise, this message is generated as an error. The resolution is the same for both cases, as described below.

To correct this error

  • Change the TargetPlatform property to be consistent with assemblies being installed, or change the assemblies being added to the project.

See Also

Reference

TargetPlatform Property