Category Archives: SharePoint 2013

New stuff for SharePoint Development in Visual Studio 2012

This blog I am going to write about new stuff that has been introduced in MS Visual Studio 2012 for SharePoint development. The over all color theme of MS Visual Studio 2012 is quite different than as it was in MS Visual Studio 2010.

Here is the description of some new features introduced in Visual Studio 2012 for SharePoint development.

Reorganised the SharePoint Project Templates
The SharePoint project templates and project item templates have changed. Some SharePoint project templates from the previous version of Visual Studio were moved into project item templates.

As previously in Visual Studio 2010 many developers have been using Empty SharePoint Project instead of using Event Reciever, List Definition, Content Type, Module project types etc, So now in Visual Studio 2012 these project types have been moved to project items. SharePoint Project templates provided in Visual Studio 2012.
Visual Studio 2013 New SharePoint Project

SharePoint Project templates provided in Visual Studio 2010
Visual Studio 2010 New SharePoint Projects Types

The SharePoint project artifacts that cannot not be used for sand-box solutions has description “Farm solution only”. An new project item “Silverlight Web Part” is also available that is a actually a solution with web part project along with a Silverlight project.

SharePoint Project item templates provided in Visual Studio 2012
Visual Studio 2013 New SharePoint Project Items

SharePoint Project item templates provided in Visual Studio 2010
Visual Studio 2010 New SharePoint Project Items

Create Site Columns, Content Types and Lists by Using New Designers
When you create a new list or content type or list column in Visual Studio, a designer now helps you set up and lay out the contents of the new list or content type. The designers enable you to display, sort, and group the available site columns.

Publish SharePoint Solutions to Remote SharePoint Servers
In addition to deploying SharePoint solutions to a local SharePoint site, you can now publish SharePoint solutions to remote SharePoint sites.

You can use this feature as shown below. click right click project and select “Publish”

Publishing item in Solution Menu

Enter the URL of remote SharePoint site and click publish.

Publish command

Log on to the remote server if user authentication is required. The publishing progress appears in the Visual Studio Output window. When the process is finished, the solution (.wsp) file is installed on the remote SharePoint server. However, it must still be activated before it can be used in SharePoint.
On the Solution Gallery page, select the SharePoint application and then on the ribbon, choose the Activate button. In the Activate Solution dialog box, on the ribbon, choose the Activate button again. The Status column on the Solution Gallery page indicates that the application is active.

Test SharePoint Performance by Using Profiling Tools
The Visual Studio SharePoint tools now provide full support for performance profiling. The profiling tools help you identify code and other elements in your SharePoint projects that slow down and adversely affect the performance of your SharePoint applications.

In current example I am going to analyse “CPU Sampling” of current project.┬áThe sampling profiling method collects statistical data about the work that is performed by an application during a profiling run.

To do so please follow the following steps. Open and deploy your solution.

1. In Visual Studio 2012, on the Analyze menu, choose Launch Performance WizardCapture

2. On page one of the Performance Wizard, leave the method of profiling as CPU sampling and choose the Next button.On page two of the Performance Wizard, leave the profile target as project name and choose the Next button.

Performace Wizard 1

3. If a solution has multiple projects, they appear in this list.Performace Wizard 2

4. On page three of the Performance Wizard, it displays “Tier Interaction Profiling (TIP)”, If you suspect database related performance issues, make sure you will use the tier interaction option “Tier Interaction Profiling (TIP)”. This will reveal the issued SQL-Statements during profiling.The Tier Interaction Profiling (TIP) feature is useful for measuring the performance of applications that query databases and for showing you the number of times a web page is requested. Performace Wizard 3

5. On page four of the Performance Wizard, leave the Launch profiling after the wizard finishes check box selected, and then choose the Finish button.

Performace Wizard 4

The wizard enables application profiling on the server, displays the Performance Explorer window, and then builds, deploys, and runs the SharePoint application.

Now in SharePoint site browse through and invoke the functionality that you are investigating about performance issues and then close the SharePoint site. Now that you have run and profiled the SharePoint application, view the test results.

In the Functions Doing the Most Individual Work section of the Sample Profiling Report. You will find the the biggest performance bottlenecks in the application.

Profiling Report

Improved Support for Sandboxed Solutions.
Visual web parts now support sandboxed SharePoint projects, not just farm projects. When working on sandboxed solutions, Visual Studio displays a compiler error if you attempt to use farm-only API calls. Also, Visual Studio IntelliSense displays only APIs that are compatible with sandboxed solutions when you are working in a sandboxed solution.

Sand Box Solution

Support for JavaScript Debugging and IntelliSense for JavaScript
You can now debug JavaScript in SharePoint projects, and IntelliSense is provided when coding JavaScript in SharePoint projects. URL resolution for JavaScript is enabled for visual web parts in sandboxed solutions. This means that you can reference JavaScript files located in SharePoint’s content database in your SharePoint projects in Visual Studio. The code is automatically included at build time.

For more details: