Results 1 to 21 of 21

Thread: Deploying .Net applications

  1. #1

    Thread Starter
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Arrow Deploying .Net applications

    Is there an equivalent of Package & Deployment Wizard (vb6.0) in .Net? What are the things I need to know to be able to deploy an app developed in .Net? I have two incoming projects and I wish to develop it in .Net to boost my experience in it but I'm afraid I don't know how to install the app when it is finished.
    Last edited by dee-u; Jul 20th, 2005 at 08:42 PM.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Deploying .Net applications

    You won't have much of a problem deploying it. You have to keep in mind that the end user's machine must have the .NET framework on it.

    And to create your setup, you can simply add a setup project to your VS.NET IDE solution explorer.

    And it's also possible to deploy simply by copy-paste, provided that the framework exists of course.

  3. #3

    Thread Starter
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: Deploying .Net applications

    Quote Originally Posted by mendhak
    And to create your setup, you can simply add a setup project to your VS.NET IDE solution explorer.
    How to do that?

    And it's also possible to deploy simply by copy-paste, provided that the framework exists of course.
    You mean just copy the Exe made in .Net to the other computer as long as the framework exists in that computer?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Deploying .Net applications

    Right click the solution, add project... setup project.

    And

    yes, as long as the framework exists, just copy over and double click

  5. #5

    Thread Starter
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: Deploying .Net applications

    Thanks!
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  6. #6
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: [RESOLVED] Deploying .Net applications

    I just tried it, and in the Setup1 folder, tried to run both the msi file and the setup.exe file.

    They both failed saying that the folder contained an invalid character.

    I never specified a folder to install to, and it seemed to be trying to install to the name of my company name, which has a "/" in it.

  7. #7
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: [RESOLVED] Deploying .Net applications

    I guess no one reads the FAQ? There are two good step by step articles on .NET deployement.

    Application Deployment FAQ


    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  8. #8
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: [RESOLVED] Deploying .Net applications

    Well, I was following the Frog's advice. Maybe the wizard would have been a better choice? I'll look in to the config options to see what went awry.

    I also tried to install it on my laptop, which created it. I don't know if that is a good idea, as I never tested installs on my own machine.

  9. #9

    Thread Starter
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: Deploying .Net applications

    Well, the Copy-Paste didnt work! In this computer I have Microsoft .Net Framework 1.1, and my app is created using Visual Studion 2003. When I tried to run the app in this computer this error is raised:

    "Application has generated an exception that could not be handled."

    Could somebody tell me what is going on?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  10. #10
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Deploying .Net applications

    Does your app use any references? Did you set any references to CopyLocal = True?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  11. #11

    Thread Starter
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: Deploying .Net applications

    Yap, I am referencing the Webbrowser control (from VB6.0) and other controls.

    Quote Originally Posted by RobDog888
    CopyLocal = True
    Where can I set that?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  12. #12
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Deploying .Net applications

    If you set it to true then you wil have a local copy of the dependancy for distribution. Its better if your using references to
    set it to False, for now. Did you place any error handling in the start of your app so you can tell where the error may be?

    If you select your reference in the solution explorer you will see the property window change to represent the reference. Then
    you wil see that prop and know what its sset to.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  13. #13

    Thread Starter
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: Deploying .Net applications

    Ok, I'l check it our when I get home since I dont have .Net in this computer.

    No error handling yet, I still cannot fully grasp the idea behind the Error Handling (Structured) in VB.Net and I'm afraid to use it now if I dont understand it fully well.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  14. #14
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Deploying .Net applications

    Its not hard at all. Let me give it a try.

    The Try Catch block at its simplest form as realted to VB6.



    VB Code:
    1. Try = On Error GoTo
    2.  
    3. Catch ex As Exception = Error Label:
    4.  
    5. End Try = End of Error Label Sub
    6.  
    7. 'So to add some actual data for an example....
    8.  
    9. Try
    10.     Messagebox.Show((1/0).ToString) 'Generate an error
    11. Catch ex As Exception
    12.     Messagebox.Show(ex.message, "Error")
    13. End Try
    14.  
    15. 'Is the same as the old VB6
    16. On Error Goto MyError
    17.  
    18. MsgBox 1/0
    19.  
    20. Exit Sub
    21. MyError:
    22.     MsgBox "Error"
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  15. #15

    Thread Starter
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: Deploying .Net applications

    After the code in Catch, where does it goes next?
    VB Code:
    1. Try
    2.     Messagebox.Show((1/0).ToString) 'Generate an error
    3. Catch ex As Exception
    4.     Messagebox.Show(ex.message, "Error")
    5. End Try

    And what about Resume Next and Resume, what are their equivalents?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  16. #16
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Deploying .Net applications

    VB Code:
    1. Try
    2.     Messagebox.Show((1/0).ToString) 'Generate an error
    3. Catch ex As Exception
    4.     Messagebox.Show(ex.message, "Error")
    5. End Try
    6. Messagebox.Show(I'm contnuing on from here. I'm the next line of code after the Try Catchblock as long as there is no other redirecting code in the Catch section. ;).")
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  17. #17

    Thread Starter
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: Deploying .Net applications

    How about this Gansta? How will it go the bold part?

    VB Code:
    1. Try
    2.     Messagebox.Show((1/0).ToString) 'Generate an error
    3.     [B]Messagebox.Show ("Next Line1")[/B]
    4.     Messagebox.Show ("Next Line2")
    5. Catch ex As Exception
    6.     Messagebox.Show(ex.message, "Error")
    7. End Try
    8. Messagebox.Show ("Next Line Again.")
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  18. #18
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Deploying .Net applications

    Nope, but let me look around for anything equilivalent for resume, etc.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  19. #19
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Deploying .Net applications

    Ok, I got two examples or resume next (Btw, the vb6 on error handling is still in the S.VB namespace).
    VB Code:
    1. Try
    2.    ' Starts a structured exception handler.
    3.    ' Place executable statements that may generate
    4.    ' an exception in this block.
    5. Catch [optional filters]
    6.    ' This code runs if the statements listed in
    7.    ' the Try block fail and the filter on the Catch statement is true.
    8. [Additional Catch blocks]
    9. Finally
    10.    ' This code always runs immediately before
    11.    ' the Try statement exits.
    12. End Try
    13.    ' Ends a structured exception handler.
    14.  
    15.  
    16.  
    17.  
    18. 'AND FOR A SECOND EX
    19. Function GetStringsFromFile(ByVal FileName As String) As Collection
    20.    Dim Strings As New Collection
    21.    Dim Stream As System.IO.StreamReader = System.IO.File.OpenText(FileName)   'Open the file.
    22.  
    23.    Try
    24.       While True   ' Loop terminates with an EndOfStreamException
    25.                    ' error when end of stream is reached.
    26.          Strings.Add(Stream.ReadLine())
    27.        End While
    28.    Catch eos As System.IO.EndOfStreamException
    29.       ' No action is necessary; end of stream has been reached.
    30.    Catch IOExcep As System.IO.IOException
    31.       ' Some kind of error occurred. Report error and clear collection.
    32.       MsgBox(IOExcep.Message)
    33.       Strings = Nothing
    34.    Finally
    35.       Stream.Close()   ' Close the file.
    36.    End Try
    37.  
    38.    Return Strings
    39. End Function
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  20. #20
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Deploying .Net applications

    That second one interests me. I saw that in the examples when it tries to connect to SQL and then MSDE.

    It seemed to me that the try statement was a loop in itself, but I wasn't sure.

    Your second example seems to loop through the file, reading all records, which is a neat way of doing that. Let me know if that is correct?

    It would explain things a little better.

  21. #21

    Thread Starter
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: Deploying .Net applications

    This is an example error handler in VB6.0, how could I convert it to VB.Net?
    VB Code:
    1. lvwData_ColumnClick_Err:
    2.         Select Case ErrorGlobalHandler("AISIS.frmBKS.lvwData_ColumnClick")
    3.         Case vbAbort
    4.              Exit Sub
    5.         Case vbRetry
    6.              Resume
    7.         Case vbIgnore
    8.              Resume Next
    9.         Case Else
    10.              MsgBox Err.Description, vbCritical, "Critical Error Encountered"
    11.              End
    12.         End Select
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width