简体   繁体   中英

publishing a C# winform application in Visual Studio 2012

I have built a C# winform application in Visual Studio 2012. I want to publish the application to the world.

  1. What is the difference between publishing by Visual Studio and giving the "release" folder to someone ?

  2. I'd rather like giving the "release" folder because there are no installations to the user if there is the framework. But the user can see all the database files. Is there anyway to hide them and make that release folder as a single ".exe" file where user cannot see the databases of it ?

  1. When you publishing project in VS, you creating a ClickOnce package. When you building project with Release build configuration you have the same executables as builded with Debug configuration, but debug config is optimized for debugging. If you want give application to user you should build it with Release config. [What is ClickOnce]

  2. You can use a installer for your app. It's a good practice. And if you want you can write a script for example to create a shortcut on desktop or write smt in Windows Registry, etc. About free Installers you can read here . My choise is InnoSetup - open source and easy to use.

When you're giving a release folder you're actually giving the executable file and it will work just by clicking on the executable(if the framework in installed).

If you're publishing the application using the clickonce, it has to be installed(desktop based) before it can be executed.

I've been using installshield to prepare the installer which takes care of including all the required libraries as well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM