Choose dll files during uninstalling a windows form application program
I wrote a windows forms application using c# and created setup file.Everything works fine. My question is; we can choose which dll and exe file should be included to setup,like that can we choose which dll should be removed or at least when we try to uninstall program, can it ask to us "if I should these ... common dll files" ? Because when I uninstall it, it can removes common dll s with the system is currently using. So there will be a problem. I made setup file开发者_开发知识库 in visual studio.
Taking this question at face value: it is very unlikely that you are actually installing DLLs that are shared by other programs. Both the VS build system and Setup project wizards try very hard to stop you from doing this. The only effective way to do so in .NET is to strong-name the assembly and deploy it into the GAC. The non-GAC way is to implement the AppDomain.AssemblyResolve event. You would have mentioned that in your question if you actually did this.
The normal deploy mode for a Winforms app is ClickOnce or an installer, like you made, or simply copying the files. If after the install, the EXE and the DLLs it uses are in one directory then you are not sharing any DLLs.
If I guessed this wrong and you actually are sharing DLLs then by far the best solution is to stop doing this. DLL Hell is nothing to mess with.
you may consider another packaging software like InstallShield, Visual Studio Packaging projects does not offer such kind of configuration.
精彩评论