How do I include misc files for deployment?
How do I include misc files for deployment?
How do I include misc files for deployment?
How do I include misc files for deployment?
How do I include misc files for deployment?
How do I include misc files for deployment? How do I include misc files for deployment? How do I include misc files for deployment? How do I include misc files for deployment? How do I include misc files for deployment? How do I include misc files for deployment? How do I include misc files for deployment? How do I include misc files for deployment?
How do I include misc files for deployment? How do I include misc files for deployment?
How do I include misc files for deployment?
Go Back  Xtreme Visual Basic Talk > > > How do I include misc files for deployment?


Reply
 
Thread Tools Display Modes
  #1  
Old 05-06-2005, 12:08 AM
tsfg tsfg is offline
Newcomer
 
Join Date: Apr 2005
Posts: 11
Default How do I include misc files for deployment?


Greetings....I have some RTF files that populate various RTboxes in various forms. Works great on my development machine.

But I don't know how (nor can I find any info on how) to embed these files in the deployment so that they can be accessed on the target computer. I have the files stored in a certain directory on the development computer, but the directory will be different on the target.

Here's the code:

Code:
 
 Private Sub btnPreviewHelp_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPreviewHelp.Click

        Dim myReader As New System.IO.StreamReader("D:\My Documents\Visual Studio Projects\senior restore 2\help files\OpenFileHelp.rtf")
        Dim HelpText As String = myReader.ReadToEnd()
        Dim myForm4 As frmHelp
        Dim RichTextBox1 As RichTextBox
        myForm4 = New frmHelp
        myForm4.Show()
        myForm4.txtHelp.Rtf = HelpText

    End Sub
I tried to make a relative refernce to the file (rather then an absolute), but I still don't know how to get the files to the correct directory on the target.

Thanks...tsfg
__________________
TOTALLY.DAZED.AND.CONFUSED

Last edited by tsfg; 05-06-2005 at 07:48 AM.
Reply With Quote
  #2  
Old 05-07-2005, 05:16 AM
MarkD MarkD is offline
Centurion
 
Join Date: Jan 2002
Location: Wake Forest, NC
Posts: 108
Default more info?

Your thread's been moved, but since it was in the .Net General category originally, I assume you mean a deployment from Studio.Net. I can address setting up a deployment package from Studio.Net as I use it for my VB.Net solutions.

You first must set up a deployment project to be included in your .Net solution:

1- while in the IDE with your code in front of you, from the top toolbar, click File, Add Project, New Project. This will give you an Add New Project dialog box.

2-On the left, select Setup and Deployment Projects. On the right, select Setup Wizard. In the textboxes below, Name should be whatever you want to call your deployment project; Location will be where your deployment project will land when you Build the Solution, later in the process (REMEMBER THIS PATH). You can change the path using the Browse button. Click OK when done.

3-Click Next on the "welcome" page that appears (deployment wizard is starting). You will see page 2 of 5 of the wizard.

4-Choose your project type and click Next (I always click Create a Setup for Windows Application so the rest, below, is oriented to that option, but the other options probably produce similar steps). You will see page 3 of 5 of the wizard.

5-Choose the project outputs you want to include here (you are still dealing only with your project at this point (executables, debugging tags, source code if you choose to include it in the package, etc. NOT the support files you want to add yet (your help files) ). I usually just click the Primary Output box. Click Next to see page 4 of 5.

6-Files to Include (THIS IS THE PAGE YOU'RE LOOKING FOR). Click the Add button and complete the dialog box for the file you want to include with your solution. Click Open button at bottom right to add it to the list in the dialog box. If you have more than one, repeat the Add. When you've included them all. click Next to get to page 5 of 5.

7-Create Project shows you your deployment configuration. Click Finish to set it up.

You're not done! You must now go back to your IDE and build your solution.

8-Back in the IDE, looking at your code or a form in your project, click Build from the top toolbar and select Configuration Manager at the bottom of the drop-down. This will open up a dialog box.

9-At the Active Solution Configuration box at the top of the dialog box, drop down the list . Select Release and check off all boxes appearing on the right of the dialog box. Click Close to get back to the IDE (you'll be looking at your code or form again).

10.Click Build at the top toolbar, click Build Solution. Watch the status line at the bottom left of your screen. It will begin by saying: Building... Eventually, it will say Build Succeded.

You are done building your deployment project, but you still need to actually deploy it.

11.Go to the directory path you REMEMBERED from your first deployment screen (2 above) and find a subdirectory called Release.

12.The contents of the Release subdirectory is your deployment package. Copy it to some distribution media: burn a CD, create a zip file with it to e-mail ahead of your visit, whatever. (you won't see your included files in this package; they're buried in one of the other files there)

13.To set-up the software on a the receiving PC(s), insert the CD (or unzip) on that PC and run the Setup.exe. Answer the questions as it processes, including any changes to the Program Files path where it is to place your executable (I usually keep it at Program Files, but change the "your company name" subdirectory to my real company name).

14.Once the setup completes, YOU WILL FIND YOUR FILES IN the directory path from 13 above in a subdirectory by the name of the deployment project Name you specified in 2 above. Move them to wherever you want them on the client PC.

15.Aim your program at them accordingly so it knows where they are (if you knew the path when you coded your program, the location could be hardcoded in your program; if you did an "application path" kind of thing in your program, just leave the files where they were plopped by setup and don't move them at all. I usually use an App.Configuration file in my program and tweak that at this time to point to any files I may include - Application configuration's is another great feature of .Net, and another story ).

I hope this is what you were looking for tsfg. I know deployment can be a daunting thing just getting started with .Net but once you do it a couple of times it gets easier.

One nice thing with .Net is that for future releases of a program, if your support files don't change, deployment is a snap, as after you've deployed to a machine once you can get away with rebiuilding the deployment project on your development machine and then copying just the executable (.exe file) over the previous one on the client PC for a quick upgrade. No set-up.exe required. This is especially helpful if using an App.config file where you don't want to overlay your previous tweaks each time you redeploy (such as included file paths ).

MarkD
Reply With Quote
  #3  
Old 05-07-2005, 03:15 PM
tsfg tsfg is offline
Newcomer
 
Join Date: Apr 2005
Posts: 11
Default

WOW!!!!....Thanks MarkD. A very thorough and clear procedure.

The deployment instructions in the VB.net book I am using follow a different methodology, and at no time does anything pop-up to allow me to incorporate these files.

I'll give this a try your way and see what haps!

tsfg
__________________
TOTALLY.DAZED.AND.CONFUSED
Reply With Quote
  #4  
Old 05-14-2005, 10:56 PM
alienpyro alienpyro is offline
Newcomer
 
Join Date: May 2005
Posts: 2
Default

I too have ran into a similar problem. The explanation is great except for one small part. What path do we imbed in our code? I was having trouble understanding your description of what to make the file path. Lets say I wanted to use an absolute path, what exactly is the path to the folder that has the misc files? Thx very much I have been trying to figure this one out for a while.
Reply With Quote
  #5  
Old 05-21-2005, 04:38 PM
alienpyro alienpyro is offline
Newcomer
 
Join Date: May 2005
Posts: 2
Default

Anyone at all that can help with this?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
How do I include misc files for deployment?
How do I include misc files for deployment?
How do I include misc files for deployment? How do I include misc files for deployment?
How do I include misc files for deployment?
How do I include misc files for deployment?
How do I include misc files for deployment? How do I include misc files for deployment? How do I include misc files for deployment? How do I include misc files for deployment? How do I include misc files for deployment? How do I include misc files for deployment? How do I include misc files for deployment?
How do I include misc files for deployment?
How do I include misc files for deployment?
 
How do I include misc files for deployment?
How do I include misc files for deployment?
 
-->