Search code examples
c#.netwinformsportable-executableportable-applications

How to make C# winform application portable


I have developed a WinForms application with C# 4.5. I want to make it portable, in the sense that it should not need to be installed. To deploy this application, I would like to just copy and paste the folder of application file. Like Tally or VLC Media player.

The environment and dependencies are as follows

  • C# WinForms
  • .Net Framework 4.5
  • SQLite
  • Microsoft Report Viewer

Please suggest a way how to do it.


Solution

  • For each of your project's references, you should verify Copy Local property is set to True. This way, all the references will be copied in your project's bin folder (at compile time).

    This should be suficient for a copy/paste deployment of your bin folder.

    Keep in mind,

    no program is an island -- Don Box

    so deployment machines should need at least target framework installed.

    .NET Framework will first search inside bin folder and if reference is not found, it will search the GAC (Global Assembly Cache).