This documentation is archived and is not being maintained.

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 different than the TargetPlatform Property of the project. It is generated as an error unless your Setup project uses 64-bit DLL custom actions (regardless of the TargetPlatform you specified), in which case this message is generated as a warning. The resolution is the same for both cases, as described below.

If the project's TargetPlatform is x86, the assembly is targeting x64 or Itanium.

If the project's TargetPlatform is x64, the assembly is targeting Itanium.

If the Project's TargetPlatform is Itanium, the assembly is targeting x64.

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