none
How to Deploy VB.Net application?

    Question

  • Hi guys,

    I Googled my problem but couldn't get exactly what i want. My problem's here:

    I finished developing my VB.NET project in Microsoft Visual Studio 2008

    I use MySQL Server 5.0 for the database and MySQL Connector/NET 5.0.9 to communicate.

    I also have crystal reports in the project.

    I want to deploy my application; the program itself, MySQL database (it is in C:\Program Files (x86)\MySQL\MySQL Server 5.0\data\sisdb) , MySQL Connector/NET, crystal report and redistributable .NET framework in a .exe/.msi setup file.

    It doesn't matter SINGLE or MULTIPLE .exe/.msi setup(s) all i want to is to have the simple installation process in any target machine.

    I'll roll on the floor thanking you for your help as i will always will.

    I want you to pardon my too many redundant "i" :)

    Cheers >>>
    Wednesday, August 18, 2010 3:28 PM

Answers

  • If you want to use ClickOnce deployment, here is some overview information.

    ClickOnce Overview

    http://msdn.microsoft.com/en-us/library/142dbbz4(VS.90).aspx

     

    HowTo publish a clickonce app   

    http://msdn2.microsoft.com/en-us/library/31kztyey(VS.80).aspx   

    http://msdn.microsoft.com/en-us/library/31kztyey.aspx  (vs2010)

    You can use the Bootstrapper Manifest Generator to create the bootstrapper packages for each component and deploy them as prerequisites to the application. Here's some info on that:

    http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/92d68fc3-3c00-4435-9d45-f781aad89ad1

     

    http://jcrawfor74.wordpress.com/2008/02/27/bootstrap-manifest-generator-how-to-custom-pre-requisites/

    http://msdn.microsoft.com/en-us/library/ms165429.aspx

    If you aren't using an Express version of Visual Studio, you can create a setup & deployment package, but you'll still need to create prerequisites.

    how to set up a setup & deployment package
    http://support.microsoft.com/kb/307353

    RobinDotNet 


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    • Marked as answer by Nura Grafix Monday, August 23, 2010 10:44 AM
    Thursday, August 19, 2010 7:20 AM
    Moderator
  • Hi Robin,

    Thank you very much. I tried but its not working at all because this is my first time of having MySQL Server project.

    PLEASE HELP ME, i want is it to make it installable set up for other target machine.

    Here is the COMPLETED VB.NET project:
    http://www.4shared.com/file/4UBh92gQ/Project_Code.html  


    I include the project database "sisdb" copied from my machine (C:\Program Files (x86)\MySQL\MySQL Server 5.0\data\sisdb)

    Please I used:

    - Microsoft Visual Studio 2008
    - MySQL Server 5.0 
    - MySQL Connector/NET 5.0.9
    - Crystal Reports
    - I also have access database in the bin\debug directory

    My current working project directory is C:\SIS\

    I CAN NEVER Thank YOU enough Robin >>>

    • Marked as answer by Nura Grafix Monday, August 23, 2010 10:44 AM
    Thursday, August 19, 2010 1:34 PM
  • Hi Nura,

    Since you said that your project needs MySql support, you need to create a custom prerequisite for MySql. Then the mysql server will be installed before the msi package is installed. You could follow the document below:
    http://www.codeproject.com/KB/aspnet/Add_Custom_Prerequisite.aspx

    Regards,
    Aland Li 


    Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.
    • Marked as answer by Nura Grafix Monday, August 23, 2010 10:44 AM
    Friday, August 20, 2010 8:47 AM
    Moderator
  • Aland is right. You'll need custom prerequisites for anything that you want installed in addition to the ClckOnce application itself.

    You will need to include the database file in your project and set the build action to 'content' and 'copy to output directory' to 'copy if newer'.

    I don't recommend using "the clickonce way" of handling data, I recommend handling it differently; here is an article about it:

    http://robindotnet.wordpress.com/2009/08/19/where-do-i-put-my-data-to-keep-it-safe-from-clickonce-updates/

    Robin


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    • Marked as answer by Nura Grafix Monday, August 23, 2010 10:44 AM
    Friday, August 20, 2010 7:47 PM
    Moderator
  • Thanks Robin/Alan for you responses,

    My silly question is, Must i have to install MySQL Server and MySQL Connector/NET for my application to work in other machines?

     

    Thanks >>>

    • Marked as answer by Nura Grafix Monday, August 23, 2010 10:44 AM
    Saturday, August 21, 2010 11:15 AM
  • Hi Nura,

    It depends on the architecture of the application which will be installed.

    1. The application is a client application, you need to include MySQL Connector/NET if the client directly connects to the MySql server, you do not need to include anything if the application connects to a server application via Web Service or other protocols.

    2. The installed application is a server application, both the MySQL Server and MySQL Connector/NET need to be included.

    Regards,
    Aland Li

    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg@microsoft.com

     


    Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.
    • Marked as answer by Nura Grafix Monday, August 23, 2010 10:44 AM
    Monday, August 23, 2010 5:23 AM
    Moderator
  • Hi guys,

     

    Thank you all for your reply. I actually confused myself for reading too many articles on deployments issue.

     

    I actually resort to use the old-fashioned XCOPY combined with little tricks in the following script:

     

    @ECHO OFF
     
    ECHO Welcome to SIS installations process! 
    ECHO For safety reasons it may take 25mins 
    ECHO or more depending on your system speed. Good Luck!
    
    ECHO.
    ECHO Currently installing MySQL Server ...
    
    START /WAIT MySQL5.0.msi 
    ECHO Server was successfully Installed!
    
    ECHO.
    ECHO Currently installing MySQL Data Connector ...
    
    START /WAIT mysql-connector-net-509_2.exe
    ECHO Data Connector was successfully Installed!
    
    ECHO.
    
    ECHO Configuring SIS Database. Please wait ...
    
    XCOPY sisdb "C:\Program Files\MySQL\MySQL Server 5.0\data\sisdb" /D /E /C /R /I /K /Y
    XCOPY sisdb "C:\Program Files (x86)\MySQL\MySQL Server 5.0\data\sisdb" /D /E /C /R /I /K /Y
    
    ECHO.
    ECHO Database Configured Successfully! 
    
    ECHO.
    ECHO Currently installing Report Viewer ...
    
    START /WAIT CRRedist2008_x86.msi
    START /WAIT CRRedist2008_x64.msi
    ECHO Viewer was successfully Installed!
    
    ECHO.
    ECHO Currently installing .NET Framework 3.5 ...
    
    START /WAIT dotnetfx35.exe
    ECHO Framework is ready!
    
    ECHO.
    ECHO All Prerequisites were installed!
    ECHO Now installing main SIS Software ...
    
    START /WAIT SISsoft.exe
    ECHO SIS' was successfully Installed!
    

    All i want was for user to hit single button and follow the on-screen instruction.

     

    Have a nice day >>>

    • Marked as answer by Nura Grafix Monday, August 23, 2010 10:43 AM
    Monday, August 23, 2010 10:43 AM

All replies

  • If you want to use ClickOnce deployment, here is some overview information.

    ClickOnce Overview

    http://msdn.microsoft.com/en-us/library/142dbbz4(VS.90).aspx

     

    HowTo publish a clickonce app   

    http://msdn2.microsoft.com/en-us/library/31kztyey(VS.80).aspx   

    http://msdn.microsoft.com/en-us/library/31kztyey.aspx  (vs2010)

    You can use the Bootstrapper Manifest Generator to create the bootstrapper packages for each component and deploy them as prerequisites to the application. Here's some info on that:

    http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/92d68fc3-3c00-4435-9d45-f781aad89ad1

     

    http://jcrawfor74.wordpress.com/2008/02/27/bootstrap-manifest-generator-how-to-custom-pre-requisites/

    http://msdn.microsoft.com/en-us/library/ms165429.aspx

    If you aren't using an Express version of Visual Studio, you can create a setup & deployment package, but you'll still need to create prerequisites.

    how to set up a setup & deployment package
    http://support.microsoft.com/kb/307353

    RobinDotNet 


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    • Marked as answer by Nura Grafix Monday, August 23, 2010 10:44 AM
    Thursday, August 19, 2010 7:20 AM
    Moderator
  • Hi Robin,

    Thank you very much. I tried but its not working at all because this is my first time of having MySQL Server project.

    PLEASE HELP ME, i want is it to make it installable set up for other target machine.

    Here is the COMPLETED VB.NET project:
    http://www.4shared.com/file/4UBh92gQ/Project_Code.html  


    I include the project database "sisdb" copied from my machine (C:\Program Files (x86)\MySQL\MySQL Server 5.0\data\sisdb)

    Please I used:

    - Microsoft Visual Studio 2008
    - MySQL Server 5.0 
    - MySQL Connector/NET 5.0.9
    - Crystal Reports
    - I also have access database in the bin\debug directory

    My current working project directory is C:\SIS\

    I CAN NEVER Thank YOU enough Robin >>>

    • Marked as answer by Nura Grafix Monday, August 23, 2010 10:44 AM
    Thursday, August 19, 2010 1:34 PM
  • Hi Nura,

    Since you said that your project needs MySql support, you need to create a custom prerequisite for MySql. Then the mysql server will be installed before the msi package is installed. You could follow the document below:
    http://www.codeproject.com/KB/aspnet/Add_Custom_Prerequisite.aspx

    Regards,
    Aland Li 


    Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.
    • Marked as answer by Nura Grafix Monday, August 23, 2010 10:44 AM
    Friday, August 20, 2010 8:47 AM
    Moderator
  • Aland is right. You'll need custom prerequisites for anything that you want installed in addition to the ClckOnce application itself.

    You will need to include the database file in your project and set the build action to 'content' and 'copy to output directory' to 'copy if newer'.

    I don't recommend using "the clickonce way" of handling data, I recommend handling it differently; here is an article about it:

    http://robindotnet.wordpress.com/2009/08/19/where-do-i-put-my-data-to-keep-it-safe-from-clickonce-updates/

    Robin


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    • Marked as answer by Nura Grafix Monday, August 23, 2010 10:44 AM
    Friday, August 20, 2010 7:47 PM
    Moderator
  • Thanks Robin/Alan for you responses,

    My silly question is, Must i have to install MySQL Server and MySQL Connector/NET for my application to work in other machines?

     

    Thanks >>>

    • Marked as answer by Nura Grafix Monday, August 23, 2010 10:44 AM
    Saturday, August 21, 2010 11:15 AM
  • Hi Nura,

    It depends on the architecture of the application which will be installed.

    1. The application is a client application, you need to include MySQL Connector/NET if the client directly connects to the MySql server, you do not need to include anything if the application connects to a server application via Web Service or other protocols.

    2. The installed application is a server application, both the MySQL Server and MySQL Connector/NET need to be included.

    Regards,
    Aland Li

    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg@microsoft.com

     


    Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.
    • Marked as answer by Nura Grafix Monday, August 23, 2010 10:44 AM
    Monday, August 23, 2010 5:23 AM
    Moderator
  • Hi guys,

     

    Thank you all for your reply. I actually confused myself for reading too many articles on deployments issue.

     

    I actually resort to use the old-fashioned XCOPY combined with little tricks in the following script:

     

    @ECHO OFF
     
    ECHO Welcome to SIS installations process! 
    ECHO For safety reasons it may take 25mins 
    ECHO or more depending on your system speed. Good Luck!
    
    ECHO.
    ECHO Currently installing MySQL Server ...
    
    START /WAIT MySQL5.0.msi 
    ECHO Server was successfully Installed!
    
    ECHO.
    ECHO Currently installing MySQL Data Connector ...
    
    START /WAIT mysql-connector-net-509_2.exe
    ECHO Data Connector was successfully Installed!
    
    ECHO.
    
    ECHO Configuring SIS Database. Please wait ...
    
    XCOPY sisdb "C:\Program Files\MySQL\MySQL Server 5.0\data\sisdb" /D /E /C /R /I /K /Y
    XCOPY sisdb "C:\Program Files (x86)\MySQL\MySQL Server 5.0\data\sisdb" /D /E /C /R /I /K /Y
    
    ECHO.
    ECHO Database Configured Successfully! 
    
    ECHO.
    ECHO Currently installing Report Viewer ...
    
    START /WAIT CRRedist2008_x86.msi
    START /WAIT CRRedist2008_x64.msi
    ECHO Viewer was successfully Installed!
    
    ECHO.
    ECHO Currently installing .NET Framework 3.5 ...
    
    START /WAIT dotnetfx35.exe
    ECHO Framework is ready!
    
    ECHO.
    ECHO All Prerequisites were installed!
    ECHO Now installing main SIS Software ...
    
    START /WAIT SISsoft.exe
    ECHO SIS' was successfully Installed!
    

    All i want was for user to hit single button and follow the on-screen instruction.

     

    Have a nice day >>>

    • Marked as answer by Nura Grafix Monday, August 23, 2010 10:43 AM
    Monday, August 23, 2010 10:43 AM
  • i developed my windows application in x64 ........i want to publish it to work for x86.....how can i do.......
    Saturday, October 23, 2010 10:26 AM
  • Just set the TargetCPU to x86. You'll have to either do separate deployments, or target your 64-bit machines with x86 as well.

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Sunday, October 24, 2010 5:23 AM
    Moderator