Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install and deploy VB.NET

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces how to install and deploy VB.NET. It is very detailed and has a certain reference value. Friends who are interested must finish it!

VB.NET installation and deployment 1). Create a deployment project

1. On the File menu, point to add Project, and then choose New Project.

two。 In the add New Project dialog box, select install and deploy Project in the Project Type pane, and then select install Project in the templates pane. Type setup1 in the name box.

3. Click OK to close the dialog box.

4. The project is added to solution Explorer and the file system editor opens.

5. In the Properties window, select the ProductName property and type the information management system.

VB.NET installation and deployment II). Add the output of the main program project to the deployment project

1. In the File system Editor, select Application folder. On the actions menu, point to add, and then select Project output.

two。 In the add Project output Group dialog box, select your Program in the Project drop-down list.

3. Click OK to close the dialog box.

4. Select the main output and content File groups from the list, and then click OK.

VB.NET installation and deployment III). Create an installer class

1. On the File menu, point to New, and then choose Project.

two。 In the New Project dialog box, select Visual Basic Project in the Project Type pane, and then select Class Library in the templates pane. Type installDB in the name box.

3. Click Open to close the dialog box.

4. Choose add New item from the Project menu.

5. Select installer Class in the add New item dialog box. Type installDB in the name box.

6. Click OK to close the dialog box.

7. The detailed code is attached.

VB.NET installation and deployment IV). Create a custom installation dialog box

1. Select the setup1 project in solution Explorer. On the View menu, point to Editor, and then choose user Interface.

two。 In the user interface editor, select the Startup node under installation. On the actions menu, choose add Dialog Box.

3. In the add dialog box, select the license Agreement dialog box, and then click OK to close the dialog box.

4. In the add dialog box dialog box, select the text box (A) dialog box, and then click OK to close the dialog box.

5. On the actions menu, choose move up. Repeat this step until the text Box (A) dialog box is above the installation folder node.

6. In the Properties window, select the BannerText property and type: install the database.

7. Select the BodyText property and type: setup will install the database on the target machine

8. Select the Edit1Label property and type: database name:

9. Select the Edit1Property property and type CUSTOMTEXTA1

10. Select the Edit1Value property and type: dbservers

11. Select the Edit2Label property and type: server name:

twelve。 Select the Edit2Property property and type CUSTOMTEXTA2

13. Select the Edit2Value property and type: (local)

14. Select the Edit3Label attribute and type: user name:

15. Select the Edit3Value property and type: sa

16. Select the Edit3Property property and type CUSTOMTEXTA3

17. Select the Edit4Label attribute and type: password:

18. Select the Edit4Property property and type CUSTOMTEXTA4

19. Select the Edit2Visible, Edit3Visible, and Edit4Visible properties and set them to true

VB.NET installation and deployment 5). Create a custom action

1. Select the setup1 project in solution Explorer. On the View menu, point to Editor, and then choose Custom actions.

two。 Select the install node in the Custom Action Editor. On the actions menu, choose add Custom Action.

3. In the Select items in Project dialog box, double-click Application folder.

4. Select the main output from the installDB item, and then click OK to close the dialog box.

5. In the Properties window, select the CustomActionData property and type "/ dbname= [CUSTOMTEXTA1] / server= [CUSTOMTEXTA2] / user= [CUSTOMTEXTA3] / pwd= [CUSTOMTEXTA4] / targetdir=" [TARGETDIR]\ ".

Attachment: / targetdir= "[TARGETDIR]\" is the target path after installation. In order to get the post-installation path in the installDB class, we set this parameter.

VB.NET installation and deployment 6). Add Fil

1. Add SQL Server backup as a file DB.dat to the "setup1" project (right-click Database-> all work-> backup Database in Enterprise Manager and back up as a file named DB.dat)

two。 Add the installation file LisenceFile.rtf to the "setup1" project

3. In the user interface editor, select the license agreement and set the LisenceFile property to the LisenceFile.rtf file

4. Dependencies are usually automatically added to "detected dependencies", and if not, we will manually add them to step 5)

Crystal_Managed2003.msm

(if there is a Crystal report)

Dotnetfxredist_x86.msm

(.net must be a must)

... (if there are references to other dll)

5. If Crystal reports are used, manually add the files to be included: project-> add-> merge module (including dotNetFramework and MDAC27), located at: C:\ Program Files\ Common Files\ Merge Modules\, * necessary

The specific functions are as follows:

(the managed component MSM handles the distribution of all managed components, including the Windows forms Viewer, the Web forms Viewer, and all Crystal Decisions namespaces)

* Crystal_Managed2003.msm

Crystal_Managed2003_chs.msm

For all other files needed to make the report run, the database access MSM handles its distribution. This includes database, export, and chart drivers. )

* Crystal_Database_access2003.msm

Crystal_Database_access2003_chs.msm

(KeyCode MSM handles the installation of Crystal Decisions key numbers, note that the merge module is added, otherwise there is no "MergeMouduleProperties" attribute.)

* Crystal_regwiz2003.msm

If the report file uses ADO.NET 's dataset dataset objects, then the VC_User_CRT71_RTL_X86_---.msm and VC_User_STL71_RTL_X86_---.msm modules must also be included in the installation project. And the "Module Retargetable Folder" entry of the file installation properties of these two modules must be modified to the system directory)

VC_User_CRT71_RTL_X86_---.msm VC_User_STL71_RTL_X86_---.msm

(many people often have query errors, you might as well add this)

6. Open the solution-> right-click on the properties of Crystal_regwiz2003.msm, and fill in "License Key" in "MergeMouduleProperties" with: AAP5GKS0000GDE100DS (this is the password of the registration number you used to generate Crystal Report! )

VB.NET installation and deployment 7). Add uninstall function when packing:

Method 1:

1. Add the file msiexec.exe to the package item (generally found under c:\ windows\ system32\)

two。 Select the application files in the File system tab, click the right button on the msiexec.exe, select create Shortcut, and rename the shortcut to Uninstall.

3. Change the Arguments of this shortcut to "/ x {product id}" and the value of the product id to the ProductCode attribute value of the packaged item.

Method 2: (recommended)

1. To install the package, make a note of ProductCode (select the root directory of solution Explorer, such as setup1, and then check the property tab, not the properties in the right button). You will need to use the following

two。 Create a new console program uninst.exe file with VS.net

'power by: landlordh

'for 2000 and xpjue 2003

Module uninstall

Sub Main ()

Dim myProcess As Process =

New Process

If System.Environment.OSVersion.

ToString.IndexOf ("NT 5") Then

MyProcess.Start ("msiexec", "/ X"

{2B65D4A9-C146-4808-AB4B-321F

B0779559} ") 'change to your own ProductCode

End If

MyProcess.Close ()

End Sub

End Module

3. Add the exe file of the console program BIN directory to the packaged program file to create a shortcut to uninst.exe in the program group

VB.NET installation and deployment 8). Add. Net environment and MDAC features when packaging:

After installing the PluginInstaller.msi plug-in for MS, package it with vb.net 's own packaging tool, and you will automatically type in the. net framework environment. Then you can package MDAC by setting up the following steps. Install MDAC using the Setup project

1. Ensure that the Visual Studio .NET Framework bootstrapper plug-in is installed.

two。 Select the Setup project in Solution Explorer. Point to Editor from the View menu and select Launch Conditions (launch condition).

3. Select the Requirements on Target Machine (search target computer) node. From the Action menu, select Add Registry Launch Condition (add Registry search).

4. Select the Search for RegistryEntry1 node. In the Properties window, select the RegKey property and type Software\ Microsoft\ DataAccess.

5. Select the Root property and select vsdrrHKLM.

6. Select the Value attribute and type FullInstallVer.

7. Select the Property attribute and type MDACSEARCH.

8. In Launch Conditions Editor (launch condition), add the Condition1 node. Select the Condition1 node, in the Properties window, select the Condition property, and select MDACSEARCH > = "2.6".

9. Select the Setup project in Solution Explorer. On the Project menu, select Properties.

10. Set the Bootstrapper property to Windows Installer Bootstrapper (Windows installation bootstrapper).

These are all the contents of the article "how to install and deploy VB.NET". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report