Using Visual Studio 2010 with SharePoint 2010
Now in its fourth generation, Visual Studio 2010 is the de facto standard for development on the Windows platforms. Although developers can take advantage of Visual Studio 2010 to develop C++ applications and other applications that are compiled down to machine code, the typical developer creates applications on top of the .NET Framework, the same framework that SharePoint is built upon. SharePoint’s use of the .NET Framework is apparent in the ASP.NET controls, layout pages, master pages, ascx controls, and aspx pages visible throughout the system’s C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14 directory.
When developing applications for SharePoint 2010, developers typically code using familiar languages such as VB.Net or C#. Although the syntax of these two languages is different, Visual Studio 2010 compiles the code down to an intermediate language called MSIL where the code, regardless of the originating syntax, behaves roughly the same. Furthermore, code developed in different .NET projects using different languages can reference code developed in another .NET language. For more information about the .NET Framework, see http://www.microsoft.com/net/.
Visual Studio 2010 has now standardized and streamlined packaging and deployment of solution packages (WSP), an area in which the preceding versions of Visual Studio fell short. A solution package is a cabinet file with a .wsp extension that contains the application code, a manifest, and one or more directories containing application specific files. Visual Studio 2010 can deploy, activate, deactivate, and un-deploy solution packages without requiring the developer to open a command prompt or PowerShell.
Note
Before starting development in SharePoint 2010 with Visual Studio 2010, a developer should have familiarity with the Microsoft.NET Framework and familiarity with VB or C# because most code samples available on the web are provided in one or both of these common languages.
Getting Started with Visual Studio 2010
This section introduces some basics in getting Visual Studio installed and the basics of creating a new project. Experienced users may want to skip this section and move to the next section, which covers creating a web part.
If needed, Visual Studio Professional or Ultimate can be downloaded from Microsoft at http://www.microsoft.com/visualstudio/ for a 60-day trial. The Professional, Premium, and Ultimate versions of Visual Studio 2010 all contain the SharePoint add-in that makes it possible to develop for SharePoint 2010. Although Visual Studio 2010 supports development and deployment of SharePoint components on a remote server, most templates cannot be developed or deployed unless SharePoint is installed on the same system as Visual Studio 2010.
Downloading and Installing Visual Studio 2010
Follow these steps to download and install Visual Studio Professional. These steps may vary slightly on different system configurations. Note that the full installation requires ~7GB of space:
1. | Access the Microsoft Downloads site (http://www.microsoft.com/downloads/details.aspx?FamilyID=26bae65f-b0df-4081-ae6e-1d828993d4d0&displaylang=en
or search on “Microsoft Visual Studio 2010 Professional Trial - Web
Installer” on Microsoft’s website) and click the Download button. |
2. | Click Run to run the downloader application vs_proweb.exe. |
3. | Click Run when this application downloads. |
4. | The
Installation Wizard opens and starts. If desired, uncheck the box next
to Yes, Send Information About My Setup Experiences to Microsoft
Corporation, and then click Next. |
5. | The
wizard then informs that it will install: Microsoft Application Error
Reporting, VC 9.0 Runtime (x86), VC 10.0 Runtime (x86), VC 10.0 Runtime
(x64), Microsoft .Net Framework 4, Microsoft Visual Studio 2010 64-bit
Prerequisites, Microsoft Visual Studio 2010 Professional. Click the box
next to I Have Read and Accept the License Terms, and click Next. |
6. | Leave the Full option selected and click Install. |
7. | The
items mentioned in step 5 will then download and install. This process
takes a while, but the wizard lists which step it is on and the download
speed, which is more helpful than the average progress bar. |
8. | When the installation is complete, a reboot is required, so click Restart Now. |
9. | Upon reboot the installation process completes, which again takes a while. |
10. | After
the setup completes, the option is provided to Install Documentation
that is recommended for less-experienced users of Visual Studio. Click
Install Documentation to start the process. |
11. | Accept the default Library location or enter a new one. Click OK. |
12. | The
Help Library Manager window then provides a directory of content to
choose from. For example, click Add next to SharePoint Development in
the Visual Studio 2010 section, and click on Update. |
13. | Click Finish; then click Exit to exit the Help Library Manager. |
14. | Finally, click Finish to close the Visual Studio installation wizard. |