none
TargetPlatform property -> VSTO 2010 Addin RRS feed

  • Question

  • Hi,

    I have created an Outlook Addin using using VSTO 2010 (Office component for 4.0 Target Framework). I want to created a Windows Installer for the following scenarios :

    1. Outlook 2010 - 32 bit and Windows 7 - 32 bit

    2. Outlook 2010 - 32 bit and Windows 7 - 64 bit

    3. Outlook 2010 - 64 bit and Windows 7 - 32 bit

    4. Outlook 2010 - 64 bit and Windows 7 - 64 bit

    I want to know how many different MSI i have to create ?

    What should i set in TargetPlatform (x86 or x64) ?

    Is TargetPlatform for Outlook or for windows machine ?

     

    Also, i am using VC++ class library project as well along with C# class library. Which prerequisite for VC++ i should use (x86 or x64) ? Is there are a bootstrapper that can use either of the two on its own similar to the one for VSTO 2010 runtime ?

     

    I know there are a lot of questions but it will be great if somebody can answer.

    Thanks


    Kulvinder
    Monday, March 14, 2011 11:12 AM

All replies

  • Just an update :

    I have a Windows 7 64 bit machine and Outlook 2010 - 32 bit.

    I changed the target platform of my windows installer to x64 and run the setup on my machine and as soon as i opened Outlook, i got a prompt whether i trust the add-in or not. However, in the earlier case when i run the same addin with x32 as target platform, i didnt receive any such prompt. Why did i got the message ? I am the administrator user and i thought both "Program Files" and "Program Files (x86)" are trusted folders and there should be no prompt for Trust in both the cases. Can anyone explain please ?

     

    Thanks


    Kulvinder
    Monday, March 14, 2011 11:52 AM
  • Please help me on this.
    Kulvinder Singh
    Tuesday, March 15, 2011 10:09 AM
  • Hi Kulvinder,

    Thanks for posting in the MSDN Forum.

    As far as I see, we’re not able to run 64 bit application on 32 bit System. So I think we needn’t create Outlook 2010 – 64 bit and Windows7 – 32 bit MSI.

    And when I reviewed all of the posts you write I think you want to find a correct way to deploy 32 bit on the 64 bit machine. Do you want it?

    If it is, I recommend you take a look http://msdn.microsoft.com/en-us/library/cd7a85k9(v=VS.100).aspx .

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, March 16, 2011 3:34 AM
    Moderator
  • Thanks a lot for your reply.

    However, i am not satisfied with the answer. I had already gone through the article you referred to. Please read my questions and try to answer as many as you can.

    Hope to see replies from you very soon.

    Thanks a lot.


    Kulvinder Singh
    Wednesday, March 16, 2011 5:30 AM
  • Hi Kulvinder

    I think the mean of prompt shown is to say computer is not sure about the add-in can be trusted. It dose not relate to the “Program Files” or “Program Files(x86)” whether a trusted folder. Would you please provide more details of the prompt message for me to do further research?

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, March 16, 2011 10:22 AM
    Moderator
  • Sorry, but i dont agree with your answer.

    I just set the target platform to x64 and installed it on a machine with Outlook 2010 64 bit and i didnt receive any trust prompt this time.

    Hope to see your replies for the other questions.

    Thanks


    Kulvinder Singh
    Wednesday, March 16, 2011 10:31 AM
  • Hi,

    I have a developer machine with VS 2010 and Outlook 2010-32 bit installed on Windows 7 - 64 bit OS. I created an Outlook 2010 addin targeted for x86 platform but when i run this installer on a Windows Xp machine with Outlook 2010 - 32 bit installed, i get the following error :

    This product is designed for x64 platform but is being installed on Intel. Obtain the correct setup from the manufacturer.

    Can somebody help me with this ?

    Thanks


    Kulvinder Singh
    Wednesday, March 16, 2011 4:42 PM
  • Hi Kulvinder,

    Thanks for your question.

    I will involve some experts who familiar with this kind of issue to reply your question. There might be some time delay. Appreciate your patience.

    Thank you for your understanding and support.

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, March 18, 2011 4:55 AM
    Moderator
  • Hi Kulvinder,

    You should create two installer MSIs.  One for the x86 platform and one for the x64 platform.  In this case the target platform maps to the OS platform architecture (x86 vs x64).

    Here is a matrix to understand the issue better:

    Platform architecture || Outlook Bitness || Installer Type Needed
    x86 32 bit 32 bit
    x64 32 bit 32 bit
    x64 64 bit 64 bit

    You need the installer to be 32 bit for Outlook 32 bit on both x86 and x64.  The only reason why you need a 64 bit installer is the scenario where it's Outlook 64 bit on x64.  If you build your installer in this manner that will be the easiest way to do it.  Since you are using a C++ library as well that further complicates things however my matrix still holds true.

    Regards,

    Dave


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members re

    Monday, March 21, 2011 7:13 PM
  • Hi Dave,

    I am able to understand what you are saying. Please confirm the following setups i have made :

    1. Target Platform (in Windows Installer) as x86 - Will automatically work for Outlook 32 bit. Prerequisites for C++ library - x86

        Windows target - x86 or x64.

        Question - Do you think there will be 2 setups - one with C++ 32 bit for 32 bit windows and one with C++ 64 bit on 64 bit windows ?

                        Will it work if i create a setup with prerequisite as C++ 32 bit for both 32 bit and 64 bit machine

    2. Target Platform (in Windows Installer) as x64 - Will automatically work for Outlook 64 bit. Prerequisites for C++ library - x64

        Windows target - x64

    So, in all do i need 2 setups or 3 setups ?

     

    Thanks


    Kulvinder Singh
    Thursday, March 24, 2011 5:58 AM
  • Hi Kulvinder,

    To clarify, I am assuming that the C++ library that you have is also a DLL.  If that is the true then you only need 2 set up projects.  Windows will not load 64 bit DLLs into a 32 bit process.  Therefore, the 32 bit set up project you create for the x86 platform will need to be used for Outlook 2010 32 bit on the 64 bit OS.  Since in this case Outlook is running as 32 bit it can only load 32 bit DLLs.  This includes VSTO and your C++ library.

    In the case where the target is Outlook 200 64 bit on Windows 64 bit, a Windows installer targeting x64 will suffice.  I am assuming that this installer will include the C++ dependency.

    I hope that clarifies things.  If not, please respond back.

    Dave


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members re

    Thursday, March 24, 2011 7:54 PM
  • Thanks a lot for the clarifications. It was really helpful.
    Kulvinder Singh
    Friday, March 25, 2011 11:28 AM
  • I have one more question on this for the following setting :

    Windows 7 64 bit OS, Outlook 2010 - 32 bit, MSI target set as x86, all C# project as any CPU and C++.NET dll as Win 32.

     

    I get the following warning while i am compiling my code :

    MyCPPdotNET.dll targets a different processor than the application.

     

    Although this is a warning but how to get rid of this ?


    Kulvinder Singh
    Monday, April 4, 2011 8:16 PM
  • Una buena idea es crear un proyecto de instalación y en las propiedades del proyecto de instalación f4, seleccionar TargetPlatform = x86 o x64
    Friday, June 10, 2011 8:43 PM