Chris
Chris

Reputation: 2303

Make windows form application portable

I have created a windows application and I have published it by publishing wizard. Now I want to make it portable so that the end user does not need to install the application. The application is very simple and the only dll it is referencing is office outlook interop.

Please let me know how can I make the application portable

Upvotes: 2

Views: 4612

Answers (2)

Geoff Appleford
Geoff Appleford

Reputation: 18832

You should be able to just copy the files in the bin folder and launch the app from there. This is called "XCOPY deployment", long marketed as one of the major benefits of .NET applications.

Just make sure that you set the properties on the Office reference so that the DLL is copied into the bin folder, too.

However, for this to work, the client machine must have the appropriate version of the .NET Framework installed. So it won't be truly portable unless you can control the configuration of all target machines, but at least it's a good start.

Upvotes: 3

Kamyar
Kamyar

Reputation: 18797

There's no need for the Winforms application to be installed. Just set Copy Local to true for your external referenced dlls. Build your project and copy all the files in /Bin/Release or /Bin/Debug (depending on project settings).

The only thing that has to be installed on the client's machine is the appropriate .Net Framework version.

Upvotes: 0

Related Questions