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?
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.
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
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.