40
IT 211 Project Integration and Deployment Lab #11

IT 211 Project Integration and Deployment Lab #11

Embed Size (px)

Citation preview

Page 1: IT 211 Project Integration and Deployment Lab #11

IT 211

Project Integration and Deployment

Lab #11

Page 2: 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.

Page 3: IT 211 Project Integration and Deployment Lab #11

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.

Page 4: IT 211 Project Integration and Deployment Lab #11

Project Integration

3. Open an IDE then open Main solution that contains the startup form of project.

Page 5: IT 211 Project Integration and Deployment Lab #11

Project Integration

4. Select file Add Exiting Project

5. Choose SecondProject in our case and open C# solution file(SecondProject.csproj).

Page 6: IT 211 Project Integration and Deployment Lab #11

Project Integration

6. Two project files will displayed in solution explorer.

7. In FirstProject solutionright click Add Reference.

Page 7: IT 211 Project Integration and Deployment Lab #11

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.

Page 8: IT 211 Project Integration and Deployment Lab #11

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();

Page 9: IT 211 Project Integration and Deployment Lab #11

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

Page 10: IT 211 Project Integration and Deployment Lab #11

Installation:

• Visit Visual studio website , download from here

Page 11: IT 211 Project Integration and Deployment Lab #11

Generate Your Project

• When you want to convert project to exe file follow the following:

– Open your project solution.– Then:

Select file – New - Project

Page 12: IT 211 Project Integration and Deployment Lab #11

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

Page 13: IT 211 Project Integration and Deployment Lab #11

Generate Your Project Cont…

• “Setup Wizard” will start, click “Next”

Page 14: IT 211 Project Integration and Deployment Lab #11

Generate Your Project Cont…

1-select setup to create a Windows

Application

2 -Press Next

Page 15: IT 211 Project Integration and Deployment Lab #11

Generate Your Project Cont…1-Check two

output group as you see

2 -Press Next

Page 16: IT 211 Project Integration and Deployment Lab #11

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”

Page 17: IT 211 Project Integration and Deployment Lab #11

Generate Your Project Cont…

• Click “Finish”.

Page 18: IT 211 Project Integration and Deployment Lab #11

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

Page 19: IT 211 Project Integration and Deployment Lab #11

Generate Your Project Cont…

• The setup project is added now to your solution and a “File System” tab is opened.

Page 20: IT 211 Project Integration and Deployment Lab #11

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

Page 21: IT 211 Project Integration and Deployment Lab #11

Create Application Shortcut Cont…

• Double click “Application Folder”.1-select

Application Folder

2 -Press OK

Page 22: IT 211 Project Integration and Deployment Lab #11

Create Application Shortcut Cont…1-select

Primary output

3 -Press

OK

2-select Active configuration

4 -Press OK

Page 23: IT 211 Project Integration and Deployment Lab #11

Create Application Shortcut Cont…

• A shortcut is added.

• You can rename it by right click -> Rename.

Page 24: IT 211 Project Integration and Deployment Lab #11

Add Application Icon

• You can change your project’s icon from the “properties window”.

• Click button beside Icon properties.

Page 25: IT 211 Project Integration and Deployment Lab #11

Add Application Icon Cont…

• Click on “User Desktop” then “Add file”

Page 26: IT 211 Project Integration and Deployment Lab #11

Add Application Icon Cont…

• Select a file..

Page 27: IT 211 Project Integration and Deployment Lab #11

Finish Your Project Deployment

• From the main menu.

• Wait until the build succeeds.

Page 28: IT 211 Project Integration and Deployment Lab #11

Testing

• Go to your project folder. You can see the setup folder added to your project

• Open it.

Page 29: IT 211 Project Integration and Deployment Lab #11

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.

Page 30: IT 211 Project Integration and Deployment Lab #11

Testing Cont…

• To try to install your program click on “setup.exe”.

• Complete the installation.• The project shortcut is on you desktop now.

Page 31: IT 211 Project Integration and Deployment Lab #11

Testing Cont…

• Double click the icon.

• Your program runs now.

Page 32: IT 211 Project Integration and Deployment Lab #11

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"

Page 33: IT 211 Project Integration and Deployment Lab #11

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

Page 34: IT 211 Project Integration and Deployment Lab #11

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

Page 35: IT 211 Project Integration and Deployment Lab #11

Generate Your Project by using InstallShield

• “New Project” window will appear.2-InstallShield

3 -Press OK

1 -Setup and deployment

Page 36: IT 211 Project Integration and Deployment Lab #11

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 .

Page 37: IT 211 Project Integration and Deployment Lab #11

• 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

Page 38: IT 211 Project Integration and Deployment Lab #11

• 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

Page 39: IT 211 Project Integration and Deployment Lab #11

• Free C# Books:

• http://www.onlinecomputerbooks.com/free-csharp-books.php

C# E-book

Page 40: IT 211 Project Integration and Deployment Lab #11

Any Question ?