Upload
marsha-wilcox
View
217
Download
1
Embed Size (px)
Citation preview
IT 211
Project Integration and Deployment
Lab #11
Outline
• Integrate your solutions in single project.
• Five step for Project deployment .
• Essential resources for C#. Net.
Project Integration
• Two solutions can be integrated in the same project. Follow the following steps:
1. Make sure that the project is not open in the IDE (this step is extremely important)
2. Copy both project in the same folder.
Project Integration
3. Open an IDE then open Main solution that contains the startup form of project.
Project Integration
4. Select file Add Exiting Project
5. Choose SecondProject in our case and open C# solution file(SecondProject.csproj).
Project Integration
6. Two project files will displayed in solution explorer.
7. In FirstProject solutionright click Add Reference.
Project Integration
8. The above windows will displayed9. Select Project tab you will see SecondProject in the project
Name. 10. Select SecondProject then press OK.
Project Integration
Now, all the Forms in SecondProject Can be Opened In the FirstProject Form(s). But You Shouldknow the NameSpace of SecondProject.
NameSpace.FormX VariableName= new NameSpace.FormX(); VariableName.Show();
Project deployment
• Project deployment means:How to convert your project to a full application executable file (.exe file).There are more than 2 ways in VS.net 2013 version
– First way, Download the MS visual installer project from visual studio gallery page from this link. Then go through the same old versions steps.
https://visualstudiogallery.msdn.microsoft.com/9abe329c-9bba-44a1-be59-0fbf6151054d– Or, download InstallShield software that cooperate with MS to provide
high deployment services specially for web or mobile applications.– Others deployments methods, available here http://msdn.microsoft.com/en-us/library/wtzawcsz.aspx
Installation:
• Visit Visual studio website , download from here
Generate Your Project
• When you want to convert project to exe file follow the following:
– Open your project solution.– Then:
Select file – New - Project
Generate Your Project
• “New Project” window will appear.
2 -select setup Wizard
5 -Press OK
1 -visual studio
installer
3 -Program name
4 -select Add to solution
Generate Your Project Cont…
• “Setup Wizard” will start, click “Next”
Generate Your Project Cont…
1-select setup to create a Windows
Application
2 -Press Next
Generate Your Project Cont…1-Check two
output group as you see
2 -Press Next
Generate Your Project Cont…
• From here you can add files to your project.
1. When you click “Add”, a dialog will be opened to allow you to choose the file you need to add. You can add picture files, sound files, text files, an icon for your project, a read me file …etc.
2. Click “Next”
Generate Your Project Cont…
• Click “Finish”.
Generate Your Project Cont…If you create new setup project and didn’t join it with the solution file(missing step4), you need to add your project solution from here
1 -right click on setup solution2 -add exiting project3 -select your project
Generate Your Project Cont…
• The setup project is added now to your solution and a “File System” tab is opened.
Create Application Shortcut
• To create a shortcut to your program on the user’s desktop.
• Click “User’s Desktop”.• Right click the empty area on the right.• Choose “Create New Shortcut”
2 -go to the empty area
1-select user’s Desktop
3 -right click choose create New shortcut
Create Application Shortcut Cont…
• Double click “Application Folder”.1-select
Application Folder
2 -Press OK
Create Application Shortcut Cont…1-select
Primary output
3 -Press
OK
2-select Active configuration
4 -Press OK
Create Application Shortcut Cont…
• A shortcut is added.
• You can rename it by right click -> Rename.
Add Application Icon
• You can change your project’s icon from the “properties window”.
• Click button beside Icon properties.
Add Application Icon Cont…
• Click on “User Desktop” then “Add file”
Add Application Icon Cont…
• Select a file..
Finish Your Project Deployment
• From the main menu.
• Wait until the build succeeds.
Testing
• Go to your project folder. You can see the setup folder added to your project
• Open it.
Testing Cont…
• You will find a debug folder, Open it.
• The debug folder contains two files: “your setup name.msi” and “setup.exe”.
• These two files are the setup files.
Testing Cont…
• To try to install your program click on “setup.exe”.
• Complete the installation.• The project shortcut is on you desktop now.
Testing Cont…
• Double click the icon.
• Your program runs now.
Common Mistake
• Before anything, you have to make sure you didn’t use current directory in your code. Instead, write the file/folder name directly.
• Examples: ₋ PictureBox1.Image =
Image.FromFile("Sunset.jpg")₋ FileName = "myFile.txt"
Generate Your Project by using InstallShield
For 2010 - 2013 visual studio: -You need to download other material to allow desktop deployment
which is InstallShield .
-By using InstallShield Limited Edition, you can create a setup file and distribute it to users so that they can install a desktop application or
component without being connected to a network .
-InstallShield Limited Edition is free for users of all Visual Studio editions except the Express editions
-ISLE is a great solution for those customers looking for added capabilities not found in Visual Studio Installer Projects, such as TFS and MSBuild integration, support for creating new web sites and ISO 19770-2 Tagging support, etc
Generate Your Project by using InstallShield
To enable InstallShield Limited Edition
• On the menu bar, choose File, New, Project.
• In the New Project dialog box, expand the Other Project Types node, and then
• choose the Setup and Deployment node.
• In the template list, choose Enable InstallShield Limited Edition, and then • choose the OK button.
• In the browser window that opens, read the instructions, and then choose the Go to the download web site link
Generate Your Project by using InstallShield
• “New Project” window will appear.2-InstallShield
3 -Press OK
1 -Setup and deployment
Generate Your Project by using InstallShield
How to get InstallShield Limited Edition for Visual StudioStep 1: Verify that your computer has a network connection.Step 2: Go to the download web site.Step 3: Register to download the solution, and install it or save it for deployment to your Team Foundation Server.Step 4: After installation you will need to restart Visual Studio to access InstallShield Limited Edition project type under the Setup and Deployment
category .
• Online Example(Project Deployment):• http://www.c-sharpcorner.com/UploadFil
e/vishnuprasad2005/SetupProjects12022005022406AM/SetupProjects.aspx
• To download Awicons pro
• http://www.awicons.com/icon-editor/
Reference
• Free C# Programming E-books & Reviews :
• http://more-csharp.blogspot.com/
• Free and open source C# projects
• http://www.dotnetspider.com/
• Open sources project source
• http://cplus.about.com/od/projects/tp/opensource.htm
C# Web Site
• Free C# Books:
• http://www.onlinecomputerbooks.com/free-csharp-books.php
C# E-book
Any Question ?