+ All Categories
Home > Technology > New SharePoint Developer Tools in Visual Studio 2012

New SharePoint Developer Tools in Visual Studio 2012

Date post: 20-Aug-2015
Category:
Upload: imaginet
View: 275 times
Download: 2 times
Share this document with a friend
Popular Tags:
76
New SharePoint Developer Tools in Visual Studio 2012 Jeremiah Walker SharePoint Consultant [email protected]
Transcript
Page 1: New SharePoint Developer Tools in Visual Studio 2012

New SharePoint Developer Tools in Visual Studio 2012Jeremiah WalkerSharePoint [email protected]

Page 2: New SharePoint Developer Tools in Visual Studio 2012

Session Goals:• Introduce new SharePoint object designer tools in

Visual Studio 2012• Create a SharePoint 2013 solution in Visual Studio

2012.• Walk through new wsp packaging process for Visual

Studio 2012.  • Use deployed solution in SharePoint 2013 with

custom content objects.

Page 4: New SharePoint Developer Tools in Visual Studio 2012

SharePoint Development Tools in Visual Studio 2012

There are many new tools in Visual Studio 2012 to help increase developer productivity. As we review the new tools for SharePoint development and how they increase developer productivity the common theme that begins to surface is ……..

Page 5: New SharePoint Developer Tools in Visual Studio 2012

DESIGNERS, DESIGNERS !!!!!!!

SharePoint development in Visual Studio 2010 involved creation of SharePoint objects and then defining the properties and attributes of those SharePoint objects using declarative XML in an Elements or Manifest file.

Page 6: New SharePoint Developer Tools in Visual Studio 2012

Elements.xml

Page 7: New SharePoint Developer Tools in Visual Studio 2012

In Visual Studio 2012 this is replaced with Wizard style tabbed designers that generate the Elements.xml.

Page 8: New SharePoint Developer Tools in Visual Studio 2012

Types of Designers:In Visual Studio 2012 we are introduced to 2 new SharePoint object Designers.

Content Type Designer

List Designer

Page 9: New SharePoint Developer Tools in Visual Studio 2012

Content Type DesignerAllows you to design a content type using custom columns developed in the current Visual Studio solution or existing Site Columns from the SharePoint dev environment. The properties of the Content Type are also set in the new Content Type Designer.

Page 10: New SharePoint Developer Tools in Visual Studio 2012

List DesignerAllows you to design a SharePoint list using custom content types developed in the current Visual Studio solution or from the SharePoint dev environment. You can also assign individual columns to the list from the Designer.

Page 11: New SharePoint Developer Tools in Visual Studio 2012

Click the Content Type button. This will display the Content Type Settings window. From this window you can manage the existing content types and add additional content types including content types from the solution.

List Designer Cont.

Page 12: New SharePoint Developer Tools in Visual Studio 2012

Click the Views tab on the List Designer. This will display the default View for the list and the columns displayed in the View.

Page 13: New SharePoint Developer Tools in Visual Studio 2012

The List Designer also allows definition of properties of the List.

Page 14: New SharePoint Developer Tools in Visual Studio 2012

Other Tools in Visual Studio 2012In Visual Studio 2012 not only do we have the introduction of the Designer tools there is also the added Project level properties for Site URL and Server Connection status!!!

Tell the status of your SharePoint dev environment right from Visual Studio.

Page 15: New SharePoint Developer Tools in Visual Studio 2012

Other Tools Cont.The Visual Studio Project Templates have been updated to make the new SharePoint 2013 App project template available in Visual Studio 2012.

Page 16: New SharePoint Developer Tools in Visual Studio 2012

Office Tools

http://aka.ms/OfficeDevToolsForVS2012

To enable the SharePoint 2013 project templates the Office Developer tools SDK for Visual Studio 2012 must be downloaded and installed.

Page 17: New SharePoint Developer Tools in Visual Studio 2012

Time to Build ???How can we use these tools to quickly build a SharePoint solution??

We will utilize the new Designer Tools in Visual Studio 2012 to define a new Work Order application.

The Work Order application will have a Work Order list that Associates to a Work Order Items list. The Work Order Items List will display Services available to be performed on a Work Order.

Page 18: New SharePoint Developer Tools in Visual Studio 2012

Work Order Application Overview:The Work Order application will consist of Site Columns, Content Types and Custom Lists.

The Work Order list will contain Work Orders that relate to a Work Order Items list.

The Work Order Items List will display Service Offerings available to be performed on a Work Order.

The Service Offerings list will list the available Service Offerings.

Page 19: New SharePoint Developer Tools in Visual Studio 2012

WorkOrder Demo Detailed TasksCreate an empty SharePoint Project

Create new Site Columns for the Work Order Demo SolutionCreate a new Content Types for the Work Order Demo SolutionCreate a new Lists for the Work Order Demo SolutionAdd Site Columns, Content Types and Lists to WorkOrder FeatureAdd WorkOrder Feature to Package

Page 20: New SharePoint Developer Tools in Visual Studio 2012

WorkOrder Demo Tasks Cont.Create wsp solution file from Package

Add wsp solution to Central AdministrationDeploy wsp solution to Site CollectionActivate Feature in Site CollectionCreate new items in Work Order Demo Solution lists

Page 21: New SharePoint Developer Tools in Visual Studio 2012

SharePoint 2013 Developer Workstation Requirements.

x64-capable CPU16 GB of RAM; 24 GB of RAM is preferable.Windows Server 2012, Windows Server 2008 R2 Service Pack 1 x64. Or use Microsoft Hyper-V and install SharePoint 2013 on a virtual machine running a Windows Server 2008 R2 Service Pack 1 x64 or Windows Server 2012 guest operating system. Visual Studio 2012 Ultimate or Professional editionOffice Developer Tools for Visual Studio 2012SharePoint Client ComponentsAsp.NET and Web Tools 2012.2

Page 22: New SharePoint Developer Tools in Visual Studio 2012

Open Visual Studio 2012. On the start page click New Project.

Page 23: New SharePoint Developer Tools in Visual Studio 2012

This will present the New Project window which lists available project templates for Visual Studio.

Page 24: New SharePoint Developer Tools in Visual Studio 2012

In the left page of the New Project window expand the Templates section then expand Office/SharePoint and click on SharePoint solutions.

Page 25: New SharePoint Developer Tools in Visual Studio 2012

This will display the available SharePoint project templates. Select SharePoint 2013 - Empty Project.

Page 26: New SharePoint Developer Tools in Visual Studio 2012

Enter WorkOrderDemo for the project name and the solution name. Then click OK.

Page 27: New SharePoint Developer Tools in Visual Studio 2012

This will display the SharePoint Customization Wizard. Enter the url of your SharePoint site. Select Deploy as a Farm Solution. Then click Finish.

Page 28: New SharePoint Developer Tools in Visual Studio 2012

Visual Studio will create a solution with a Features folder and a Package folder.

Page 29: New SharePoint Developer Tools in Visual Studio 2012

Right click on your project and select New Folder. Name the folder WorkOrderColumns. Add 2 more folders for WorkOrderContentTypes and WorkOrderLists.

Page 30: New SharePoint Developer Tools in Visual Studio 2012

Right click on the WorkOrderColumns folder. Select Add then select New Item. This will display the Add New Item window.

Page 31: New SharePoint Developer Tools in Visual Studio 2012

In the Add New Item window select Site Column and enter ServiceOfferingName in the Name field. Then click Add.

Page 32: New SharePoint Developer Tools in Visual Studio 2012

Right click on the WorkOrderColumns folder and add another Site Column named ServiceOfferingPrice. You should now have the 2 columns in the WorkOrderColumns folder.

Page 33: New SharePoint Developer Tools in Visual Studio 2012

Open the elements.xml file for the ServiceOfferingPrice column. Set the Type property to “Currency”. Add properties of Decimals=“2”, Min=“0”, Required=“TRUE”, Group=“WorkOrder Columns”.

Page 34: New SharePoint Developer Tools in Visual Studio 2012

Open the elements.xml file for the ServiceOfferingName column. Change the property of Group to Group=“WorkOrder Columns”.

Page 35: New SharePoint Developer Tools in Visual Studio 2012

Right click on the WorkOrderContentTypes folder. Select Add then select New Item. In the Add New Item window select Content Type.

Page 36: New SharePoint Developer Tools in Visual Studio 2012

Enter ServiceOffering for the Content Type Name then click Add.

Page 37: New SharePoint Developer Tools in Visual Studio 2012

This will display the SharePoint Customization window. Select Item as the base content type and click Finish.

Page 38: New SharePoint Developer Tools in Visual Studio 2012

This will display the Content Type Designer window. Add the ServiceOfferingName and ServiceOfferingPrice columns to the content type.

Page 39: New SharePoint Developer Tools in Visual Studio 2012

Click the Content Type tab in the Content Designer Window. Update the display name for the Content Type. Set the group name as WorkOrder Content Types and uncheck the Inherit from Parent Content Type check box. Save the Content Type.

Page 40: New SharePoint Developer Tools in Visual Studio 2012

Right click on the WorkOrderLists folder and select Add then select New Item. From the Add New Item window select List. Set the Name to ServiceOfferings then click Add.

Page 41: New SharePoint Developer Tools in Visual Studio 2012

This will display the SharePoint customization window. Set the name to Service Offerings. Then click Finish.

Page 42: New SharePoint Developer Tools in Visual Studio 2012

This will display the SharePoint List Designer window. Delete the Title Column then Click the Content Type button. This will display the Content Type Settings window.

Page 43: New SharePoint Developer Tools in Visual Studio 2012

Add the ServiceOffering content type and delete the 2 existing content types. Then click OK.

Page 44: New SharePoint Developer Tools in Visual Studio 2012

The list has now been updated with the columns from the Content Type.

Click on the Views tab in the Content Type Designer window.

Page 45: New SharePoint Developer Tools in Visual Studio 2012

This will display the default View for the list and the columns displayed in the View.

Page 46: New SharePoint Developer Tools in Visual Studio 2012

In the Selected Columns pane select Title and click the Left Arrow to remove the Title column from the default View. Then click the List tab in the SharePoint List Designer window.

Page 47: New SharePoint Developer Tools in Visual Studio 2012

This will display the List settings page. Remove the space in the Relative URL value. Then save the list.

Page 48: New SharePoint Developer Tools in Visual Studio 2012

Repeat these steps to create the Site Columns and Content Types for a WorkOrders and WorkOrderItems Lists.

The WorkOrder Content Type will have the following columns:

Page 49: New SharePoint Developer Tools in Visual Studio 2012

The WorkOrderItem Content Type will have the following columns:

To Create the 2 Lookup Type columns on the WorkOrderItem Content Type set the following properties of the Site Column.

Page 50: New SharePoint Developer Tools in Visual Studio 2012

The WorkOrderItemService Column will Lookup data on the ServiceOfferings list. Set the below properties to configure this look up.

Page 51: New SharePoint Developer Tools in Visual Studio 2012

The WorkOrderItemWorkOrderId Column will Lookup data on the WorkOrders list. Set the below properties to configure this look up.

Page 52: New SharePoint Developer Tools in Visual Studio 2012

Once all Site Columns, Content Types and Lists are created expand the Features folder then open the Features1 feature. This will display the Feature Designer Window.

Page 53: New SharePoint Developer Tools in Visual Studio 2012

Change the Title to WorkOrderFeature. Set the scope to Site. Click the double right arrow to add the existing solution items to the Feature.

Page 54: New SharePoint Developer Tools in Visual Studio 2012

In the Solution Explorer right click on Feature1 and select rename. Rename the Feature to WorkOrderFeature then click Enter. Then save the Feature.

Page 55: New SharePoint Developer Tools in Visual Studio 2012

Expand the Package folder then double click on Package.package This will open the SharePoint Package Designer window. Ensure the name is WorkOrderDemo.

Page 56: New SharePoint Developer Tools in Visual Studio 2012

In the Package Designer ensure the Feature is in the Items in the Package pane. Then save the Package.

Page 57: New SharePoint Developer Tools in Visual Studio 2012

In the solution explorer right click on the Project and select Build. Once the build is successful right click on the Project and select Publish. This will display the Publish window. Set the Publish location to c:\publish. You will have to create this folder. Then click Publish.

Page 58: New SharePoint Developer Tools in Visual Studio 2012

When Package is completed the status in the lower left corner of Visual Studio will display Publish succeeded.

Open the C:\Publish folder in Windows explorer to view the .wsp file.

Page 59: New SharePoint Developer Tools in Visual Studio 2012

From the Windows Server 2012 Home Screen open SharePoint Management Shell as an Administrator. Enter the below PowerShell command to add the wsp Solution to SharePoint.

Page 60: New SharePoint Developer Tools in Visual Studio 2012

Once added to SharePoint PowerShell will display this result.

Open Central Administration then click on System Settings.

Page 61: New SharePoint Developer Tools in Visual Studio 2012

This will display the System Settings page. In the Farm Management section click on Manage farm solutions.

Page 62: New SharePoint Developer Tools in Visual Studio 2012

This will display the existing Farm Solutions if any.

Page 63: New SharePoint Developer Tools in Visual Studio 2012

Click on WorkOrderDemo solution name. This will display the Solution Properties page. From this page the solution can be deployed to the Site Collection.

Page 64: New SharePoint Developer Tools in Visual Studio 2012

Click Deploy Solution. This will display the Deploy Solution page. Leave the settings as default and click OK.

Page 65: New SharePoint Developer Tools in Visual Studio 2012

This will display the Solution Management page again and the status of the solution will be Deployed.

Open the SharePoint site in the browser and navigate to the Site Settings page.

Page 66: New SharePoint Developer Tools in Visual Studio 2012

In the Site Collection Administration section click Site Collection Features. This will display all existing Site Collection Features. Ensure the WorkOrderFeature is Active.

Navigate to the Site Contents page of the SharePoint site.

Page 67: New SharePoint Developer Tools in Visual Studio 2012

In the Site Collection Administration section click Site Collection Features. This will display all existing Site Collection Features. Ensure the WorkOrderFeature is Active.

Navigate to the Site Contents page of the SharePoint site.

Page 68: New SharePoint Developer Tools in Visual Studio 2012

Ensure the ServiceOfferings, WorkOrders and WorkOrderItems list apps are displayed on the Site Contents page. If not add them from the Add an App page.

Click on the ServiceOfferings list app to navigate to the list.

Page 69: New SharePoint Developer Tools in Visual Studio 2012

This will display the ServiceOfferings list app. On the ServiceOfferings list app click the Items tab then click New Item to create a new Service Offering.

Page 70: New SharePoint Developer Tools in Visual Studio 2012

Enter the Service Offering Name and Service Offering Price then click Save.

Page 71: New SharePoint Developer Tools in Visual Studio 2012

This will display the Service Offering just created.

Page 72: New SharePoint Developer Tools in Visual Studio 2012

Navigate to the WorkOrders list and add an Item then navigate to the WorkOrderItems list to add an item that looks up data from the ServiceOffering and WorkOrders lists.

Page 73: New SharePoint Developer Tools in Visual Studio 2012

This completes the tasks for creating a Custom Site Column, Custom Site Content Type, Custom SharePoint List, SharePoint Feature, SharePoint package and a SharePoint .wsp Solution file in Visual Studio. Then adding the .wsp Solution file to SharePoint, deploying the .wsp Solution file to a Site Collection then creating an item of the Content Type in the custom SharePoint list.

Page 74: New SharePoint Developer Tools in Visual Studio 2012

Imaginet would like to give your organization an opportunity to enter to win one week of free SharePoint Consulting. In order to enter we need more information on the project.

• Company Name:• Key Stakeholder:• Engagement Contact Information: • Description of Business Challenge:• Key Considerations:• Desired Outcome:• Is this a budgeted project? If so, what is the

budget?• Preferred Engagement Timeline:

Please provide the above information to [email protected] by April 30th,2013 to enter.*

Business Intelligence

Enterprise Content Management

User Experience and Design

Custom Applications

Windows Azure

Free SharePoint Consulting Services:

*Travel and Expenses are not included*Engagement dates based upon Imaginet availability

Page 75: New SharePoint Developer Tools in Visual Studio 2012

SharePoint TechFest Booth - 417

Web Site – www.imaginet.com/sharepoint

Imaginet Blog – blog.imaginet.com

Twitter - @justimaginet

Facebook – www.facebook.com/justimaginet

Email – [email protected]

Want to know more…?


Recommended