Project targeted against MSIL (AnyCPU) references an x86 targeted assembly -- will it work on VSTO x64? RRS feed

  • Question

  • I am really not sure which forum to ask this question in, but since it is related to VSTO I will start here...  If I build a VSTO application that targets the x86 platform, will it load properly on a configuration with Office x64 install?

    Our build is currently targeting MSIL (Any CPU), however I am getting a build warning:

    MSB3187: Referenced assembly 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ReferenceAssemblies\v2.0\Microsoft.TeamFoundation.WorkItemTracking.Client.Cache.dll' targets a different processor than the application. 

    This is happening because our dependency is targeted against the x86 platform.  I am worried that if we try to install against the x64 platform, it will fail when that assembly gets called.

    Will this be a problem?

    ~Joe | Enriching TFS through Office integration

    Friday, September 21, 2012 6:55 PM


  • Hi Joe,

    Thanks for posting in the MSDN Forum.

    It's based on my experience that this is a well-known issue with Visual Studio.

    Leave the Target Platform build setting at "Any CPU".  The warning is benign, the version of Cache.dll that will be used at runtime is actually the 64-bit version from the GAC, not the 32-bit reference version that the compiler uses to compile your program. So I think you can try it on the x64 platform.

    Also, I would sugget you a thread which has the similar problem with you. Please refer to

    Hope it helps.

    Best Regard,

    Leo_Gao [MSFT]
    MSDN Community Support | Feedback to us

    Monday, September 24, 2012 8:49 AM