Click here to Skip to main content
15,886,806 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have developed one software in C#.
Now I am creating setup project and add all the Prerequisites that are needed in project.

Now i want that setup should be working in 32 bit operating system and thats why
i am setting " target platform = x86" of setup project as showing in the following pic

https://i.imgur.com/Qg2lnym.png[^]


but when i trying to build the setup project, getting error like

'JTUpdater.exe' targeting 'AMD64' is not compatible with the project's target platform 'x86'


Here JTUpdater is another project in same solution

But when i have check build properties of that project then it is set to "AnyCpu"

https://i.imgur.com/ozprSzB.png[^]


but still getting error.

so how to solve this error.

I want that setup should be working in 32 bit operating system so " target platform = x86" of setup project is required.

so how to solve this error.

.Net Framework 4.7.2 is used in this project and using visual studio 2019

What I have tried:

build properties of that project then it is set to "AnyCpu"
Posted
Updated 18-Dec-21 21:23pm
v2

1 solution

"x86" says "Build a 32 bit app" instead of "Build a 64 bit app" - and all components of an app must be built for the same word size as the Process cannot switch between them on the fly: either memory addresses are 32 bit wide, or they are 64 bits wide, they can't be swapped from one to the other at run time.

So what the error is saying is that one of more of the components of your EXE - one of the References, basically - is set to "64 bit only" and as a result the whole EXE file can't be built as it wouldn't work.

If you want a 32 bit EXE, you must check every reference and rebuild those assemblies as necessary to support 32 bit as well.
 
Share this answer
 
Comments
Devendra Sarang 19-Dec-21 3:38am    
so it may be possible that the project which is giving error has still reference to
62 bit items and that why it is giving error
OriginalGriff 19-Dec-21 4:53am    
That's right.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900