CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2007
    Location
    New Delhi
    Posts
    70

    Embedding interop outlook dll into executable

    Hello Experts,
    I have a question regarding c# application. I have made an application in c# which interacts with microsoft outlook and reads some data from it and saves it. I referenced microsoft interop outlook library(Microsoft.Office.Interop.Outlook.dll) for this purpose. it works fine on my machine but not on other machine where VS 2008 is not installed. So somehow I want to embed this dll into my executable so that it runs successfully on other machines too. please suggest me how it can be done?

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Embedding interop outlook dll into executable

    Create a setup program for your application?

  3. #3
    Join Date
    Jun 2007
    Location
    New Delhi
    Posts
    70

    Re: Embedding interop outlook dll into executable

    yeah that is one option...but for a single executable setup looks a heavy option. I just want to copy this exe on other machine and run it directly. Although I can take this dll and run the application but I want to limit it to a single exe.

  4. #4
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,283

    Re: Embedding interop outlook dll into executable

    The best and only way is to create a Setup application, as Arjay already mentioned.
    You need not only worry about the Outlook.dll file(s), but the particular .NET Framework ( in this case 3.5 ), and all other additional components as well

  5. #5
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Embedding interop outlook dll into executable

    Quote Originally Posted by john_avi View Post
    yeah that is one option...but for a single executable setup looks a heavy option.
    You don't have a single exe, you already have one additional dependency besides having the correct framework on the target system. There's not much difference to copying two files than one if you decide to simply do that. If you want, then create a batch file to do it for you. Otherwise, create a setup program. With a setup program you get other additional benefits - like detecting whether the proper version of .net is installed and optionally installing it for you. Setting up a setup program isn't really that big of deal and you can have it automatically built for you by adding it to your project solution. It just becomes there when you need it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured