I studied for half a day... Finally, some results are achieved.
I have been reading the online tutorials for a long time. Here I also want to write my own hard work.
Package in two cases
Situation: You need to modify webconfig or execute SQL during installation.
1. webapplication situation A for short
2. website (B)
Most of the operations are searched in the blog park and there is an answer.
Here we will talk about my problems.
1. To modify webconfig, you need to add the Install installation class. In case B, there is no Install class in the new project. If Sun is the same, this is the case, depressed for a long time .... the final solution is to create a new class library with only one Install class in the class library.
II. For both case A and case B, the Install project is referenced, so the final output will have an Install. dll, which I have studied for A long time and cannot be output.
So I had to think of a trick and delete Install. dll in the Appliction_start event.
III. In case of B, there will be a lot of DLL for the website to be published. It is very easy to create one. You just need to use the plug-in. You won't be able to check this URL:
Http://www.cnblogs.com/Spring/archive/2009/04/21/1440139.html
Of course, this is not the key issue, but the added project, which has the error of "precompiled this application". This problem also fooled me for a long time.
Solution: After the website is released, cut "PrecompiledApp. config" and add it as a file in the installation project.
The problem is over .....