SAP Knowledge Base Article - Public

1548930 - Error building Visual Studio Setup Project, 'Primary output from PROJECT NAME' targeting 'AMD64' is not compatible with the project's target platform 'x86'

Symptom

  • Building a Visual Studio .NET Windows Setup Project
  • Errors and warnings are thrown when building the setup project.
Error File 'Crystal2010_Winform64.exe' of project output 'Primary output from Crystal2010_Winform64 (Active)' targeting 'AMD64' is not compatible with the project's target platform 'x86' C:\Users\Admin\Documents\Visual Studio 2010\Projects\Crystal2010_Winform64\Crystal2010_Winform32_Setup\Crystal2010_Winform32_Setup.vdproj Crystal2010_Winform64_Setup
Warning File 'Crystal2010_Winform64.exe' of project output 'Primary output from Crystal2010_Winform64 (Active)' targeting 'x64' is not compatible with the project's target platform 'x86' C:\Users\Admin\Documents\Visual Studio 2010\Projects\Crystal2010_Winform64\Crystal2010_Winform32_Setup\Crystal2010_Winform32_Setup.vdproj Crystal2010_Winform64_Setup
Warning The target version of the .NET Framework in the project does not match the .NET Framework launch condition version '.NET Framework 4 Client Profile'. Update the version of the .NET Framework launch condition to match the target version of the.NET Framework in the Advanced Compile Options Dialog Box (VB) or the Application Page (C#, F#). C:\Users\Admin\Documents\Visual Studio 2010\Projects\Crystal2010_Winform64\Crystal2010_Winform32_Setup\Crystal2010_Winform32_Setup.vdproj Crystal2010_Winform64_Setup

primary output amd64 error.png

Environment

  • Visual Studio 2010
  • Crystal Reports for Visual Studio 2010, RTM 13.0.0.99
  • .NET Framework 4.0

Reproducing the Issue

  • Create a .NET Windows Forms Application.
  • Use the Crystal Reports for Visual Studio .NET SDK in the application.
    • CrystalDecisions.CrystalReports.Engine
    • CrystalDecisions.Shared
    • CrystalDecisions.ReportSource
    • CrystalDecisions.Windows.Forms
  • Set the Platform Target for your application to x64.
  • Create a setup package to deploy your Windows Forms Application.
  • Build the setup package.
  • Errors and warning are thrown and the setup package can't build.

project platform target.png

Cause

  • The error occurs because the Setup Project's TargetPlatform doesn't match the Platform Target of the WinForm application.

Resolution

  1. When building your setup package you need to target a specific target platform: x86, x64, or Itanium.
  2. Select your setup project in the Solution Explorer, then open the Properties Window (View > Properties Window)
  3. Change the TargetPlatform to match the Platform target you set for your WinForm application (see screenshot below).
Note It is not recommended to use the Any CPU setting with Crystal Reports for Visual Studio 2010 because there are 32 bit and 64 bit runtimes available. To avoid runtime issues SAP recommends to target a specific platform for your builds. If you need to support both 32 and 64 bit runtimes, then you need to build two installation packages.

setup project properties window.png

Keywords

KBA , BI-DEV-NET , BI Software Development Kits (SDKs) - .NET or Other , Problem

Product

SAP Crystal Reports, developer version for Microsoft Visual Studio