Referenced assembly targets a different processor than theapplication

I

ImageAnalyst

I'm trying to determine the cause of two warnings in my program.
Actually it's one warning that is just in there twice (with the File,
Line, and Column columns blank so there's no way to distinguish
them). Clicking on the warnings does not show me anything at all
(nothing happens). The error is this:

Referenced assembly '..\CleanFilesToDeploy\ColorCalibrator
\CalibratorEngine.dll' targets a different processor than the
application.

The two computer platforms are this:
Platform #1:
CalibratorEngine.dll was created as a C# project using VS2008
Professional Edition on a notebook computer running WinXP. The
compile option was "Any CPU."

Platform #2:
The application that is supposed to call this DLL is on a desktop
computer running WinXP, but uses VS 2008 Express Visual Basic
Edition. It is a regular Windows executable application. This is the
system giving the warning and the system that I need to get it working
on. Buying .Net Professional Edition is a last resort for this system
due to cost.

Both platforms use Windows XP and both projects are set up to use .Net
Framework version 3.5.

The project for the DLL can't be opened on the Express Edition because
I think there's some kind of restriction like maybe the Express
Edition won't allow you to use two different languages (C# and VB).

Now I did some web searching and it seems to be a difficult problem to
fix. One of the suggested fixes said to make sure the DLL component
was using the "x86" CPU instead of "Any CPU." I did that (Project/
Properties/Compile tab/Advanced Compile Options button/target CPU
dropdown) but the warning remains.

Question #1: Is the Pro/Express edition difference the cause of the
warning?

Question #2: How do I set the target platform in VB Express Edition?
The settings in the Project Properties are different between the
Express Edition and the Professional Edition. For example, in the Pro
edition, the Advanced Compile Option has a dropdown for "Target CPU"
while in the Express edition, there is no such dropdown.

In the Professional version, I went to the Compile tab and click the
"Advanced Compile Options" button, and set the Target Platform for the
DLL to be either "Any CPU", "x86", or "x64". I tried both Any and x86
and neither one got rid of the warning. If I open the application on
the Pro version, it has the option for the executable as "Any CPU" but
like I said there's no way to specify that on the Express Edition.

If they're both targeting "Any" or both targeting "x86" then how can
they be targeting different processors? It doesn't make sense to me.

Any ideas to get rid of the warning?
 
D

Dennis

Now I did some web searching and it seems to be a difficult problem to
fix. One of the suggested fixes said to make sure the DLL component
was using the "x86" CPU instead of "Any CPU." I did that (Project/
Properties/Compile tab/Advanced Compile Options button/target CPU
dropdown) but the warning remains.

This may sound like a dumb question ... but did you rebuild after
changing the target CPU?
 
I

ImageAnalyst

This may sound like a dumb question ... but did you rebuild after
changing the target CPU?

----------------------------------------------------------------------
Dennis:
Yes I did. I did "Rebuild All" of the DLL on the Pro edition, and
copied the newly compiled DLL to the VB Express computer, and searched
the whole computer to make sure it was the only one on the hard drive,
but the warning was still there after relaunching VB.Net Express
2008. It seems to do its job, and it's only a warning not an error,
so I can probably ignore it. It's just that I'd like to remove any
potential problems if possible.
Thanks,
ImageAnalyst
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top