Deployment project build fails with VS2022, works with VS2019

Nassim Hasbani 6 Reputation points
2022-07-12T10:29:27.16+00:00

i have upgraded a solution from VS 2019 to 2022.
all is working fine, all projects build successfully and run successfully.
i was trying to build the Deployment project, i got the following error:

ERROR: File 'CrystalDecisions.VSDesigner.dll' targeting 'AMD64' is not compatible with the project's target platform 'x86'
WARNING: File 'CrystalDecisions.VSDesigner.dll' targeting 'x64' is not compatible with the project's target platform 'x86'

i made sure that all the projects under are targeting " Any CPU"

i have installed the crystal report 32 for visual studio and all the projects are running well and printing, only the deployment project is giving this error. i created a new Deployment project and got the same result

any idea how to solve that issue?

Nassim

Visual Studio Setup
Visual Studio Setup
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
1,047 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Anna Xiu-MSFT 29,096 Reputation points Microsoft Vendor
    2022-07-13T03:40:02.403+00:00

    Hi @Nassim Hasbani ,

    Welcome to Microsoft Q&A!

    The error means that the CrystalDecisions.VSDesigner.dll is a x64 dll file, but the deployment project you build is in x86 target platform.

    Although your platform target is Any CPU, it is impossible to build x64 and x86 in one project at the same time.

    You need to check your references and ensure that the CrystalDecisions.VSDesigner.dll supports 32bit.
    Or you can try to change your platform target to x64.

    Sincerely,
    Anna
    *
    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.