Click here to Skip to main content
15,889,176 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have no problem in rebuild the UAT file project. Rebuild UAT file project is a success and has no error. But once the UAT Web Setup has created after rebuild the UAT file project, it got 1 failed. The error is :

ERROR:
File 'NdefLibrary.dll' targeting 'AMD64' is not compatible with the project's target platform 'x86'


Error image as per attach below,

Error — ImgBB[^]

How supposed to solve this?

Hope anyone has solution that could help. Thank you. =)

What I have tried:

I have tried to change the compatibility platform under
Build tab > Configuration Manager, but the error still remains the same.
Posted
Updated 3-May-21 22:31pm

1 solution

Either change your project to match the library, or get a copy of the library to match your project settings: you cannot "switch" between 32 bit and 64 bit code "on the fly" while your code is running.
 
Share this answer
 
Comments
Nurul Izzati Mat Pouzi 4-May-21 5:03am    
Hi @OriginalGriff, what do you mean by "match the library"? I'm a newbie here. Hope an explanation would be appreciate =)
OriginalGriff 4-May-21 5:23am    
when you build a project, you specify the target: basically 64 bit or 32 bit - and the code that is generated is suitable for that, and that alone: you can't mix two different code sizes in one application.
So if your library is built for a specific target - "AMD64" then you can't call it at all unless the rest of your app is built for the same target.

It's a bit like a train ticket: if you buy yourself a second class ticket, and your friend first class, you can't sit together on the train!

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