Setting Up Development Environments for the 2007 Microsoft Office System

Summary: Learn how to set up development environments for the 2007 Microsoft Office system, including client and server applications. Create sample projects that demonstrate the types of application solutions that you can create using this system. (33 printed pages)

Keith Bunge, Solanite Consulting, Inc.

Alex Hart, Solanite Consulting, Inc.

Bryan Hart, Solanite Consulting, Inc.

Published: May 2007

Updated: October 2007

Updated: December 2007

Applies to: Microsoft Visual Studio 2008, Microsoft Visual Studio Tools for the Microsoft Office system (3.0), 2007 Microsoft Office System, Microsoft Office SharePoint Server 2007, Microsoft Visual Studio 2005 Tools Second Edition for the 2007 Microsoft Office System (Visual Studio 2005 Tools for Office SE), Microsoft Visual Studio 2005

  • Contents

  • Overview

  • Components of a Development Environment

  • Setting Up the Environment for Microsoft Office Programs Development

    • System Setup

    • Sample Client Projects

  • Setting Up the Environment for SharePoint Products and Technologies Development

    • Sample Server Projects
  • Installing Visual Studio 2008 Professional Edition

    • Sample Projects Using Visual Studio 2008
  • Developing Microsoft Office Solutions Using Virtual Machines

  • Conclusion

  • Additional Resources

  • About the Authors

Overview

This technical article shows developers how to set up development environments for the 2007 Microsoft Office system.

If you are a developer who creates solutions for both the 2007 Office release and Microsoft SharePoint Products and Technologies (Microsoft Office SharePoint Server 2007 and Windows SharePoint Services 3.0), we recommend that you use separate development environments for each.

The first section of this article reviews the components of the development environment. The next section walks through setting up a development environment for client development. The next section walks through setting up a development environment for SharePoint Products and Technologies. The final sections review installing Microsoft Visual Studio 2008 and developing using virtual machines.

Components of a Development Environment

To set up a successful development environment, you first need to determine which tools your development team needs. This section discusses the high-level components that make up a successful development environment for the 2007 Office system and shows you how to best configure those components.

Operating System

The operating system that you choose depends on the solutions that your development team designs and builds. This section offers advice for server development and client development.

SharePoint Products and Technologies Development

If you develop solutions for SharePoint Products and Technologies, we recommend that you install Windows Server 2003 with Service Pack (SP) 1. We recommend this environment to simplify debugging.

When your SharePoint Products and Technologies solution has problems, local debugging on the server is the most efficient way to address the problem. Remote debugging may result in time-outs or other network and resource related problems. For this reason, Windows Server 2003 SP1 is the best choice of operating system for server development.

To create a robust server development environment, each of your developers should have the following:

  • Server installation of Microsoft Visual Studio 2005

  • Microsoft Visual Studio 2005 Tools Second Edition for the 2007 Microsoft Office System (Visual Studio 2005 Tools for Office SE)
    -OR-
    Microsoft Visual Studio 2008 including Microsoft Visual Studio Tools for the Microsoft Office system (3.0)

  • Microsoft SQL Server 2005 instance

When each developer has her own instance of SQL Server 2005 and Office SharePoint Server 2007 or Windows SharePoint Services 3.0, this configuration helps prevent conflicts during development, mitigates performance issues during debugging, and ensures that the solution works in multiple environments.

Client Development

If you develop client applications for the 2007 Microsoft Office system, your choice of operating system is not constrained by any technical issues. Whether you choose Windows XP SP 2, Windows Server 2003 SP 1, or Windows Vista is determined by the standards that are prevalent in the rest of your environment.

Database Engine

Depending on the needs of your development environment, you next need to decide whether a lightweight database engine or a full-featured database engine is right for you.

Microsoft SQL Server 2005 Express Edition

SQL Server 2005 Express Edition provides a limited set of database features for a development environment. SQL Server 2005 Express Edition has a database capacity limit of 4 gigabytes (GB) and is not an ideal solution for applications that use the business data catalog feature of Office SharePoint Server 2007. If neither of these issues is a factor, SQL Server 2005 Express provides a good balance of components for server development. The Express Edition is free and easy to use, and is a good choice for lightweight development.

Microsoft SQL Server 2005 Development Edition

SQL Server 2005 Development Edition is a full-featured database engine that provides a full set of enterprise data management and business intelligence features. You can use this database engine in a server development environment and it is a good choice for large development projects.

Visual Studio 2005

Perhaps the most important component for developers is a modern, robust, and easy to use integrated development environment.

Microsoft Visual Studio 2005 Standard or Professional Edition

Visual Studio 2005 Standard or Professional Edition meets the needs of a single developer or a small development group. Standard Edition supports the fundamental tools required for development on the 2007 Microsoft Office system, including x86 (32 bit) and x64/amd64 (64 bit) compiling, local debugging, XML editing, and source control support. Professional Edition adds remote debugging and XSLT support. This set of development tools is enough for a single developer or a small development team.

Microsoft Visual Studio 2005 Team System

Microsoft Visual Studio 2005 Team System adds additional tools designed to help larger teams of developers work together. The additional tools range from code profiling, to unit testing, to project and test case management. Code profiling and unit testing help a larger or distributed development team ensure that changes made to one area of the application do not cause problems in other areas. Project management and test case management help provide development and application managers a way to understand the status of the development effort. This extended set of development and management tools provides larger or distributed teams a way to connect all the team members throughout the development process.

Microsoft Visual Studio 2005 Tools for the Microsoft Office System

Visual Studio 2005 Tools for Office provides tools and APIs for developers who want to develop solutions for Microsoft Office 2003 Editions and earlier. Document and application level add-ins that you create using Visual Studio 2005 Tools for Office usually work with 2007 Microsoft Office programs, but this article does not address that development scenario.

Microsoft Visual Studio 2005 Tools for the 2007 Microsoft Office System (Second Edition)

This component provides a number of application level interfaces for 2007 Microsoft Office programs. By adding this set of tools, Microsoft Office programs developers gain many useful additions to their development environment, including:

  • Application support for Microsoft Office programs, allowing you to create components that are loaded into the Microsoft Office clients as they are launched.

  • Microsoft Office Fluent Ribbon support, allowing you to add, remove, or modify items in the Office Fluent user interface (UI) easily.

  • Custom task pane support, allowing solution developers to create an application-level task pane easily to integrate back-end systems or manipulate documents.

  • Microsoft Office InfoPath 2007 forms designer, allowing solution developers to design and add complex business logic to Office InfoPath 2007 forms that you can then use as a stand-alone application or publish to a server running SharePoint Products and Technologies.

If your Microsoft Office application uses Office InfoPath 2007 forms, this component benefits both server and client developers.

In Visual Studio 2008 Professional Edition, this package also includes document-level add-ins.

Source Control

After you select the appropriate set of base development tools, you next need to select the proper source control system. Microsoft offers two source control options that you can purchase as additions to Visual Studio 2005. The first is Microsoft Visual SourceSafe 2005 (included in Microsoft Visual Studio 2005 Team System); the second is Microsoft Visual Studio 2005 Team Foundation Server.

Visual SourceSafe 2005

Visual SourceSafe 2005 comes with Visual Studio 2005 Team System. It is also distributed with some MSDN subscriptions. Visual SourceSafe 2005 is easy to use, and is a good choice for development environments that do not require simultaneous access to multiple versions of a project. You can use Visual SourceSafe 2005 for source code control, but it can also handle any file type in a repository database. Visual SourceSafe 2005 is best for small teams (1-7 developers) on a Local Area Network (LAN), because Visual SourceSafe 2005 is a file-based archive and it is possible that updating over an unreliable network could cause file corruption.

Visual Studio 2005 Team Foundation Server

Team Foundation Server is a new Visual Studio source control platform introduced with Visual Studio 2005 Team System. It is a collection of tools designed to help a development team successfully deliver a product. Team Foundation Server uses a Microsoft SQL Server backend repository to store its managed files, and manages both source code and binary resources. Team Foundation Server is best for development environments that have medium to large teams or for development environments that need additional collaboration features.

Third Party Source Control Systems

Visual Studio 2005 integrates well with third party source control solutions. If your environment uses a third party source control system, you need to determine if the third party system has a Visual Studio 2005 plug-in. Visual Studio 2005 provides seamless integration between source control operations and development. Using this integration can save time and training if your source control system provides a Visual Studio 2005 plug-in. For more information regarding Visual Studio 2005 source control operations, see Source Control for Visual Studio.

Solution Packages

A solution package is a reusable and portable package that contains all of the site definitions, features, Web Parts, and assemblies that are needed to install and configure an application for use in SharePoint Products and Technologies. Developing an application using a solution package provides a number of advantages for the following:

  • Infrastructure that can be versioned, easily updated, and deployed

  • Portable packages to distribute finished applications

  • A centralized localization strategy using a localization token database

For more information about how to use solutions to simplify application deployment, see Solutions Overview.

Setting Up the Environment for Microsoft Office Programs Development

System Requirements

Component

Requirement

Operating system

Windows XP Service Pack SP2, Windows Server 2003 SP1, or Windows Vista

Computer and processor

DVD-ROM; Minimum 1 gigahertz (GHz) and 512 MB of RAM; 2 GHz and 1024 MB of RAM or higher and a high-end video card recommended

Hard disk

8 gigabyte (GB) required; you can recover some of this disk space after installation by deleting any downloaded packages

Monitor resolution

Minimum 800x600; 1024x768 or higher recommended

Internet connection

Connection required for product activation

Additional components

Internet Explorer 6.0 with all service packs, Microsoft Exchange Server 2000 required for Microsoft Office Outlook 2007 users

Software Requirements

Software

Description

Visual Studio 2005

Visual Studio 2005 provides a solid base development environment for creating solutions using the Microsoft Office system. Using Visual Studio 2005, you can debug solutions from within Microsoft Office programs.

Visual Studio 2005 is required to capitalize on the more advanced tools that were created to develop applications based on Microsoft Office.

For more information, see the Visual Studio Developer Center.

Microsoft .NET Framework 3.0

Microsoft .NET Framework 3.0 provides a number of components that focus on the server development environment and is a prerequisite for Microsoft Visual Studio 2005 Tools for the 2007 Microsoft Office system.

For more information, see the .NET Framework Developer Center.

Microsoft Office programs

The 2007 Microsoft Office programs provide the basis of client-based solutions for the 2007 Microsoft Office system. They are a prerequisite for Microsoft Visual Studio 2005 Tools for the 2007 Microsoft Office System.

For more information, see Microsoft Office Online.

Microsoft Visual Studio 2005 Tools for the 2007 Microsoft Office system

Microsoft Visual Studio 2005 Tools for the 2007 Microsoft Office system provides a number of components used to create interactive and compelling solutions for the 2007 Microsoft Office system.

  • Application support for the Microsoft Office system, allowing solution developers to create components that are loaded in to the Microsoft Office programs as they launch.

  • Office Fluent Ribbon support, allowing solution developers to add, remove, or modify items easily in the UI in any Microsoft Office program.

  • Custom task pane support, allowing solution developers to create an application-level task pane to tie in to back-end systems and manipulate documents.

  • Office InfoPath2007 forms designer, allowing solution developers to design and add complex business logic to InfoPath forms used as a stand-alone applications or published to a SharePoint Products and Technologies server.

For more information, see the Visual Studio 2005 Tools for Office Second Edition.

System Setup

This section shows you how to set up a development environment for the 2007 Microsoft Office programs. The instructions assume that your system has a new installation of Windows XP SP2, Windows Server 2003 SP1, or Windows Vista.

Installing Microsoft .NET Framework 3.0

The Microsoft .NET Framework 3.0 includes the Windows Workflow Foundation and APIs that allow programmatic access to the Microsoft Office file format.

This setup requires approximately 30 minutes to complete.

To install the .NET Framework 3.0

  1. Download Microsoft .NET Framework 3.0.

    NoteNote

    This package is not required on a Windows Vista development system.

  2. Download Windows SDK for Vista and .NET Framework 3.0.

    NoteNote

    This installation package is over 1 GB in size. Microsoft suggests you choose to download the DVD image directly from the link in the download page (rather than using the default network-based installation) to complete this installation.

  3. Install the Microsoft .NET Framework 3.0. During the installation, accept all of the default installation settings.

    NoteNote

    This package is not required on a Windows Vista development system.

  4. Install the Windows SDK. During the installation, accept all of the default installation settings.

Installing Visual Studio 2005

Visual Studio 2005 provides all of the tools that a developer needs to develop 2007 Office programs. Whether you use Visual Studio 2005 Professional or Visual Studio 2005 Team System, the installation instructions are the same.

NoteNote

If you want to install Visual Studio 2008 Professional Edition instead of Visual Studio 2005, skip to the Installing Visual Studio 2008 Professional Edition section, then continue with the setup starting with Install 2007 Microsoft Office Programs section.

This setup requires approximately 1 hour to complete.

To install Visual Studio 2005

  1. Start the Visual Studio 2005 installer, which starts automatically when you insert the installation disk.

  2. Select the Visual Studio 2005 option and follow the prompts, accepting all defaults until you see the Select features to install screen. The Visual Studio 2005 installer installs the following required components: Microsoft Windows Installer 3.1, Microsoft .NET Framework 2.0, Microsoft Core XML Services (MSXML) 6.0 Parser, and Microsoft Document Explorer 2005.

  3. Under Select features to install, choose Default, and then click Install.

  4. During the installation, you need to restart the computer. Click Restart Now and wait for the system to restart. Installation continues after the system restarts.

    NoteNote

    If the installation does not automatically restart, manually restart it by following Steps 1 through 3. The installation continues where it left off.

  5. Complete the installation wizard, accepting the default settings.

  6. Select Install Product Documentation and click through the wizard until you reach the Selection / Customization step. Select Minimum for the Setup Type.

  7. Complete the rest of the installation wizard, accepting the default settings.

  8. Download Visual Studio 2005 Extensions for Windows Workflow Foundation.

  9. Install the Visual Studio 2005 Extensions for Windows Workflow Foundation. Both Microsoft .NET Framework 3.0 and Visual Studio 2005 Extensions for Windows Workflow Foundation require a network connection to install properly.

    Important noteImportant

    Do not install Visual Studio 2005 Extensions for Windows Workflow Foundation from a network drive.

Installing Visual Studio 2005 SP1

Visual Studio 2005 SP1 improves stability, scalability, performance, and processor support. If your development environment uses Visual Studio 2008 Professional Edition, you can skip this section.

This setup requires approximately 1 hour to complete.

To install Visual Studio 2005 SP1

  1. Download Visual Studio 2005 SP1.

    NoteNote

    If your development environment runs Windows Vista, download Visual Studio 2005 Service Pack 1 Update for Windows Vista.

  2. Install Visual Studio 2005 SP1. During the installation, accept all of the default installation settings.

    NoteNote

    You may encounter the following issues when you install Visual Studio 2005 SP1.

    Error 1718.File '…' was rejected by digital signature policy. This problem mainly occurs on Windows Server 2003 SP1 and less frequently on Windows XP. You can find information to work around this issue documented at Microsoft Help and Support.

    Installation fails due to insufficient disk space. When Windows Installer calculates disk space, it is not always accurate. If a rollback occurs because of this, choose Repair in Add/Remove programs for Visual Studio 2005.

    Other installation problems. Less common installation problems are documented in the Installation Issues – All Platforms section in the Visual Studio 2005 Service Pack 1 Release Notes.

Installing 2007 Microsoft Office Programs

To install the 2007 Microsoft Office programs, you must have the installation media and a valid product key.

This setup requires approximately 1 hour to complete.

To install the 2007 Office system

  1. Start the 2007 Microsoft Office programs installer, which starts automatically when you insert the installation disk.

  2. Enter your product key and click Continue.

  3. During the installation, accept all of the default installation settings.

Microsoft Visual Studio 2005 Tools Second Edition for the 2007 Microsoft Office System

Microsoft Visual Studio 2005 Tools Second Edition for the 2007 Microsoft Office System provides templates that you can use to build solutions for the 2007 Microsoft Office programs. To install Visual Studio 2005 Tools for Office SE, your system needs the Microsoft Office programs and Microsoft .NET Framework 3.0.

NoteNote

Skip this section if you install Visual Studio 2008 Professional Edition.

This setup requires approximately 30 minutes to complete.

To install Visual Studio 2005

  1. Download Microsoft Visual Studio 2005 Tools for the 2007 Microsoft Office System.

  2. Start the Visual Studio 2005 Tools for Office SE installer by clicking the downloaded executable file. During the installation, accept all of the default installation settings.

After the installation completes, start Visual Studio 2005. If the application prompts you to select a role, select C# Developer.

Configuring Visual Studio for Windows Vista

If you run Visual Studio on Windows Vista, we recommend that you run with elevated (administrator) permissions. Running Visual Studio with elevated permissions helps you avoid issues that are described in the document Visual Studio 2005 on Windows Vista Issue List.

NoteNote

This section applies to both Visual Studio 2005 and Visual Studio 2008 Professional Edition.

To run with elevated permissions, the user must be a member of the Administrators group on the local computer. Right-click the Visual Studio icon and select the Run as administrator option from the shortcut menu. You can also create a shortcut to Visual Studio and select the option to run with elevated permissions always. Using this shortcut is equivalent to right clicking the Visual Studio icon and selecting the Run as administrator option.

Sample Client Projects

Microsoft Office Word 2007 Add-in Sample

This sample project shows you how to add custom toolbar options to extend the capabilities of Office Word 2007. The extension allows users to make changes to terms in a Word 2007 document.

The following procedure creates an Office Fluent Ribbon Extension.

To create a Ribbon extension

  1. Start Visual Studio 2005.

  2. On the File menu, point to New and click Project. The New Project dialog box appears.

  3. Under Project types, expand Visual C#, then expand Office and click 2007Add-ins.

  4. Under Templates, click Word Add-in.

  5. On the Projectmenu, click WordAddIn1 Properties. Click Debug, then select Start an external program. Click the ellipsis button and browse to Word 2007.

  6. In Solution Explorer, right-click the project, point to Add, and click New Item. The Add New Item dialog box appears.

  7. Click Ribbon support, and then click Add.

This creates a Ribbon Extensibility project that allows you to add new tabs to a Microsoft Office program or add controls to existing areas of the application. The Ribbon1.cs file contains the callback functions for your add-in, and the Ribbon1.xml file defines the placement of your controls and associates them to their callback.

Custom Task Pane Sample

This sample project shows you how to add custom task panes that provide a user interface into a line-of-business system, enriching the content in a Microsoft Office document, spreadsheet, or presentation. The sample task pane allows a user to query an external customer database and retrieve customer information to place it into an Office Word 2007 document.

The following procedure creates a custom task pane.

To create a custom task page

  1. Start Visual Studio 2005.

  2. On the File menu, point to New and click Project. The New Project dialog box appears.

  3. Under Project types, expand Visual C#, then expand Office, and click 2007 Add-ins.

  4. Under Templates, click Word Add-in.

  5. On the Projectmenu, click WordAddIn1 Properties. Click Debug, then select Start an external program. Click the ellipsis button and browse to Word 2007.

  6. On the Project menu, click Add User Control.

  7. After you add the control, you need to create an instance of it. View the sample project’s ThisAddIn.cs file in the ThisAddIn_Startup method for an example of what needs to be done.

This sample implements general COM extensibility and a custom task pane in a Microsoft Office program that displays a user control.

Setting Up the Environment for SharePoint Products and Technologies Development

System Requirements

Component

Requirement

Operating system

Windows Server 2003 SP1 or Windows Server 2003 x64.

Single computer installation

Server with a processor speed of at least 2.5 GHz; RAM capacity minimum of 1 GB, 2 GB recommended; disk space: up to 2 GB for installation; 5 GB or more of free disk space minimum.

Farm deployment

Web server with a processor speed of at least 2.5 GHz, minimum 2 GB of RAM; application server with dual processors of at least 2.5 GHz, minimum 2 GB of RAM; SQL Server 2000 SP3 or SQL Server 2005 SP1 with dual processors of at least 2.5 GHz, minimum 2 GB of RAM.

Internet connection

Connection for product activation.

Software Requirements

Software

Description

Operating system components

Internet Information Services (IIS) 6.0, Simple Mail Transfer Protocol (SMTP) service, World Wide Web service.

SQL Server 2005 SP1

For a development environment, SQL Server 2005 Desktop Engine is the minimum required. When developing server applications based on the 2007 Microsoft Office system, we recommend that you use a full SQL Server product, because the desktop engine can affect scalability and performance.

SQL Server 2005 is recommended to allow you to configure server-based applications properly. Scale and performance are also improved by using SQL Server 2005.

For more information, see Microsoft SQL Server Home.

Visual Studio 2005

Visual Studio 2005 provides a solid base development environment for creating solutions using the Microsoft Office system. By using Visual Studio 2005, you can debug solutions from within Microsoft Office programs.

Visual Studio 2005 provides advanced tools to help develop Microsoft Office based applications. For more information, see the Visual Studio 2005 Developer Center.

Microsoft .NET Framework 3.0

Microsoft .NET Framework provides a number of components that focus on the Server development environment, including Windows Workflow Foundation support.

For more information, see the . NET Framework Developer Center.

Microsoft Office SharePoint Server 2007 or Microsoft Windows SharePoint Services 3.0

A running instance of the specific SharePoint Products and Technologies server SKU targeted for deployment is required for debugging and testing.

System Setup

This section shows you how to set up a SharePoint Products and Technologies development environment. The instructions assume that your system has a new installation of Windows Server 2003 SP1 and that none of the required software components are installed.

Installing IIS

IIS provides the Web server engine for SharePoint Products and Technologies.

This setup requires approximately 30 minutes to complete.

To install Internet Information Services

  1. On the Start menu click Control Panel and then double-click Add or Remove Programs.

  2. In the Add or Remove Programs dialog, click Add/Remove Windows Component.

  3. In the Windows Components Wizard, double-click Application Server.

  4. In the Application Server dialog box, select ASP.NET.

  5. In the Application Server dialog box, double-click Internet Information Services (IIS).

  6. In the Internet Information Services (IIS) dialog, select SMTP Service.

  7. Click OK to confirm the selections. Click Next to install the components.

  8. Start the Internet Information Services (IIS) Manager. On the Start menu, click Administrative Tools, and then click Internet Information Services (IIS) Manager.

  9. Expand the local computer and Web Sites. Right-click Default Web Site.

  10. From the Default Web Site, select Stop.

Installing SQL Server 2005

SQL Server 2005 allows you to configure applications for maximum scale and performance. It also provides access to all additional services in SharePoint Products and Technologies.

This setup requires approximately 1 hour to complete.

To install SQL Server 2005

  1. Insert the Microsoft SQL Server 2005 Developer, Standard, or Enterprise Edition CD into the drive.

  2. Click Install and then select Server Components.

  3. Follow the prompts to create a new instance of SQL Server on your local computer.

  4. Accept the default settings and click Next until you are prompted to enter the components to install.

  5. In the Components to Install dialog box, select the options that are shown in the following figure, and then click Next.

    Figure 1. Check the appropriate components.

    Components that you select

  6. Install using the default instance.

  7. On the user credentials screen, Use domain account is selected by default. Enter the account information for the administrator here.

    User name: your local administrator

    Password: your local administrator password

    Domain: your local administrator domain

  8. On the subsequent screens, accept the defaults and click Nextuntil you reach the Install screen.

  9. At the end of setup, click Finish.

  10. Install SQL Server 2005 Service Pack 1. During the installation, accept all of the default installation settings.

Installing Microsoft .NET Framework 3.0

The Microsoft .NET Framework 3.0 includes the Windows Workflow Foundation and APIs that allow programmatic access to the Microsoft Office file format.

This setup requires approximately 30 minutes to complete.

To install the .NET Framework

  1. Download Microsoft .NET Framework 3.0.

    NoteNote

    This package is not required on a Windows Vista development system.

  2. Download Windows SDK for Vista and .NET Framework 3.0.

    NoteNote

    This installation package is over 1 GB in size. Microsoft suggests you choose to download the DVD image directly from the link in the download page (rather than using the default network-based installation) to complete this installation.

  3. Install the Microsoft .NET Framework 3.0 as described earlier in System Setup. During the installation, accept all of the default installation settings.

    NoteNote

    This package is not required on a Windows Vista development system.

  4. Install the Windows SDK. During the installation, accept all of the default installation settings.

Installing Visual Studio 2005

Visual Studio 2005 provides the environment and many of the tools that a developer needs to create SharePoint Products and Technologies based applications. Whether you use Visual Studio 2005 Professional or Visual Studio 2005 Team System, the installation instructions are the same.

NoteNote

If you want to install Visual Studio 2008 Professional Edition instead, skip to the Installing Visual Studio 2008 Professional Edition section, then continue with the Install SharePoint Products and Technologies section.

This setup requires approximately 1 hour to complete.

To install Visual Studio 2005

  1. Start the Visual Studio 2005 installer, which starts automatically when you insert the disk into the drive.

  2. Select Visual Studio 2005 and follow the prompts, accepting all default settings until you see the Select features to install screen. The Visual Studio 2005 installer installs the following required components: Windows Installer 3.1, Microsoft .NET Framework 2.0, MSXML 6.0 Parser, and Microsoft Document Explorer 2005.

  3. Under Select features to install, select Custom, configure the features according to the following figure, and then click Next.

    Figure 2. Select the features as shown in this image

    Features that you select

  4. Complete the installation wizard, accepting the defaults. Ignore the Office Dependency Warning at the end of the installation.

  5. Select Install Product Documentation, and then select Minimum.

  6. Download Visual Studio 2005 Extensions for Windows Workflow Foundation.

  7. Install the Visual Studio 2005 Extensions for Windows Workflow Foundation. Both Microsoft .NET Framework 3.0 and Visual Studio 2005 Extensions for Windows Workflow Foundation require a network connection to install properly.

  8. **Important   **Do not install Visual Studio 2005 Extensions for Windows Workflow Foundation from a network drive.

Installing Visual Studio 2005 SP1

Visual Studio 2005 SP1 improves stability, performance, and processor support. If your development environment uses Visual Studio 2008 Professional Edition, you can skip this section.

This setup requires approximately 1 hour to complete.

Installing SharePoint Products and Technologies

This setup requires approximately 30 minutes to complete.

To install Office SharePoint Server 2007

  1. Start either the Office SharePoint Server 2007 or Windows SharePoint Services 3.0 installation by clicking setup.exe.

  2. On the Read the Microsoft Software License Terms screen, select I accept the terms of this agreement, and then click Continue.

  3. On the Choose the installation you want screen, click Advanced.

  4. On the Server Type screen, select Complete, and then click Install Now.

  5. After the installation process completes, ensure that Run the SharePoint Products and Technologies Configuration Wizard Now is not selected, and then click Close.

Installing Visual Studio 2005 Extensions for Windows SharePoint Services

The Visual Studio 2005 Extensions for Windows SharePoint Services contains several new project templates including a Web Part, team site definition, and list definition template. The installation also contains a number of new item templates for Visual Studio 2005 including a custom field template, list definition with optional event handler defined, and a content type.

Important noteImportant

Versions 1.0 and Version 1.1 of the Visual Studio 2005 Extensions for Windows SharePoint Services are not compatible with Visual Studio 2008. To use these extensions, you must install Visual Studio 2005.

This setup requires approximately 30 minutes to complete.

  1. Windows SharePoint Services 3.0 Tools: Visual Studio 2005 Extensions, Version 1.1.

  2. Install Visual Studio 2005 Extensions for Windows SharePoint Services from the downloaded executable file. During the installation, accept all of the default installation settings.

Configuring SharePoint Products and Technologies

SharePoint Products and Technologies offer many configuration options. The configuration options outlined in this section provide immediate access to many portions of the server.

This setup requires approximately 30 minutes to complete.

To configure SharePoint Products and Technologies

  1. Start the SharePoint Products and Configuration Wizard, accepting the default settings until you see the Connect to a Server Farm page. Select No, I want to create a new server farm, and then click Next.

  2. In the Specify Configuration Database Settings page, enter the following information, and then click Next.

    • Database server: localhost

    • Database name: SharePoint_Config

    • User name: your local administrator

    • Password: your local administrator password

      NoteNote

      In a production environment, you should create a user account to manage the database connections.

  3. Complete the configuration, accepting the defaults.

  4. The Central Administration page should open. If it does not open, run SharePoint 3.0 Central Administration. On the Start menu, point to Administrative Tools, and then click SharePoint 3.0 Central Administration.

  5. Click the Application Management tab to open the Application Management page.

  6. Click Create or extend Web application.

  7. Click Create a new Web Application.

  8. Complete the Create New Web Application form using the information in the Figures 3, 4, and 5.

    Figure 3. Setting the IIS options

    The IIS options that you select

    IIS Web Site: Select Create a new IIS Web site.

    • Description: Keep the default

    • Port: 80

    • Host Header: Leave this empty

    • Path: Keep the default

    Figure 4. Setting the SSL options

    SSL options that you select

    Security Configuration

    • Authentication Provider: Leave this as NTLM

    • Allow Anonymous: Leave this as No

    • Use Secure Sockets Layer (SSL): Leave this as No

    Figure 5. Setting the URL options

    URL options that you select

    Load Balanced URL

    • URL: http://servername

    • Zone: Keep the default value

    Application Pool: Select Create new application pool

    • Application pool name: Keep the default value

    • Select a security account for this pool: Select Configurable and use the following values:

      User name: your local administrator

      Password: your local administrator password

    • Database Name and Authentication: Keep the default values

  9. Do not change the default values for the remaining options; click OK to create the Web application.

  10. After the Web application is created, you are directed to the Application Created page. Click Create Site Collection.

  11. Fill in the Create Site Collection form with the following information:

    • Web Application: Keep the default value

    • Title: 2007 Microsoft Office

    • Description: Initial site collection for 2007 Microsoft Office

    • Web Site Address: Select Create site at this URL and keep the default value of (root)

    • Primary Site Collection Administrator: your local administrator

    Do not change the default values for the remaining options.

  12. Click OK to create the site collection.

  13. Click Operations, and then click Incoming e-mail settings.

  14. Select Yes in the Enable Incoming E-mail section, and then click OK to save your configuration changes.

Software Development Kits

The Windows SharePoint Services 3.0 SDK and the Office SharePoint Server 2007 SDK provide access to predefined templates for a number of SharePoint solutions.

This setup requires approximately 30 minutes to complete.

To install the SDK

  1. Download the Windows SharePoint Services 3.0: Software Development Kit (SDK).

  2. Download the Office SharePoint Server 2007 SDK.

    NoteNote

    You need to download only the SDK that corresponds to the server product you are targeting. The rest of this section refers generically to the SDK.

  3. To install the SDK, click the downloaded MSI. During the installation, accept all of the default installation settings.

  4. After the installation completes, start Visual Studio 2005. If the application prompts you to select a role, select C# Developer.

Sample Server Projects

Workflow Sample

This sample project shows the power of the Windows Workflow Foundation integration in SharePoint Products and Technologies by demonstrating how to implement a custom order process. The workflow allows a user to start an order tracking process and to follow the status of an order as it is filled.

To create a workflow

  1. Start Visual Studio 2005.

  2. On the File menu, point to New and click Project. The New Project dialog box appears.

  3. In the Project Type section expand Visual C#, and then select SharePoint.

  4. In the Templates section select SharePoint Sequential Workflow Library, and then click OK.

  5. On the Project menu, select SharePointWorkflowLibrary1 Properties.

  6. Select Signing and ensure Sign the Assembly is selected.

  7. Under Choose a strong name key file, in the list, select New.

  8. In the Key file name box, enter sample and then unselect Protect my key file with a password.

  9. Click OK.

  10. By default, only the common Workflow tasks appear in the toolbox. To add the SharePoint Workflow tasks:

    1. Right-click the Toolbox, and then click Choose Items.

    2. Click the Activities tab, and then browse to: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\ISAPI\microsoft.sharepoint.WorkflowActions.dll.

  11. Click OK to add these actions.

This creates a Workflow project that you can customize for your solution. As you create new workflows, you need to supply an edit form for the workflow task to allow interaction with the custom workflow.

List Event Handler Sample

This sample project shows the capabilities of list events in SharePoint Products and Technologies. You can use list events to write customizations that act on changes to list items. These customizations can act before or after the change completes, giving you synchronous or asynchronous access to various event types. In this sample, the list event prevents a user from updating a completed task. An error message is displayed if the user attempts to update the item after it is marked as completed.

To create a list event handler

  1. Start Visual Studio 2005.

  2. On the File menu, point to New and click Project. The New Project dialog box appears.

  3. In the Project Type section, expand Visual C#, and then select Windows.

  4. In the Templates section, select Class Library, and then click OK.

  5. On the Project menu, click ClassLibrary1 Properties.

  6. Select Signing and ensure Sign the Assembly is selected.

  7. Under Choose a strong name key file, in the list, select New.

  8. In the Key file name box, enter sample and then unselect the Protect my key file with a password.

  9. Click OK.

  10. In the class implementation file, implement the SPItemEventReceiver interface.

This provides a project that implements the SPItemEventReceiver, which allows you to add list events to the Microsoft Office system. The feature definition that installs your list event handler defines which lists the handler applies to.

Web Part Sample

This sample project shows the capabilities of the Web Part template within Visual Studio 2005 Extensions for Windows SharePoint Services. The Web Part template provides a SharePoint developer with a framework to build custom Web Parts. Included in the template is the ability to configure the project to point to a specific SharePoint server instance to enable one button (F5) access to debugging the Web Part. In this sample, the Web Part shows the user information about the SharePoint site he or she is visiting. This information determines what the user has access to and displays only the relevant information.

To create a Web Part

  1. Start Visual Studio 2005.

  2. On the File menu, point to New, and then click Project. The New Project dialog box appears.

  3. In the Project Type section expand Visual C#, and then select SharePoint.

  4. In the Templates section select Web Part, and then click OK.

  5. On the Project menu, click ClassLibrary2 Properties. Click Debug, and then select Start browser with URL.

    NoteNote

    You need to set this to the URL of the SharePoint site that you want to debug.

  6. In the class implementation file, add your code to the Render method for the Web Part.

This provides a basic Web Part that implements the necessary methods to deploy and debug in a SharePoint site.

List Definition Sample

This sample project shows the capabilities of the List Definition template within the Visual Studio 2005 Extensions for Windows SharePoint Services. The List Definition template provides a framework to build custom list definitions and automatically package them into a SharePoint solution file for deployment. Included in the template is the ability to configure the project to point to a specific SharePoint server instance to enable one button (F5) access to deploy the list definition. In this sample, the list definition is based on a Task list. It includes a custom event handler to manage changes to the tasks as they are updated.

To create a List Definition Web Part

  1. Start Visual Studio 2005

  2. On the File menu, point to New and click Project. The New Project dialog box appears.

  3. In the Project Type section expand Visual C#, and then select SharePoint.

  4. In the Templates section select List Definition, and then click OK.

  5. In the List Definition Settings dialog box, select an option from the Base List Definition, select Create an instance of this list, and then select Add with event receiver.

  6. On the Project menu, click ClassLibrary2 Properties. Click Debug, and then select Start browser with URL.

    NoteNote

    You need to set this to the URL of the SharePoint site that you want to debug.

  7. In your class implementation file, add your code to the Render Method for the Web Part.

This provides a basic Web Part that implements the necessary methods to deploy and debug in a SharePoint site.

Installing Visual Studio 2008 Professional Edition

Visual Studio 2008 Professional Edition provides many of the tools that a developer needs to develop Microsoft Office 2007, Windows Vista and Web-based applications. Visual Studio 2008 Professional Edition includes many of the add-in packs that you install separately if you use Visual Studio 2005, so pay special attention to the notes in each installation section regarding which steps the Visual Studio 2008 Professional Edition installation allows you to skip.

Important noteImportant

Versions 1.0 and Version 1.1 of the Visual Studio 2005 Extensions for Windows SharePoint Services are not compatible with Visual Studio 2008. To use these extensions, you must install Visual Studio 2005.

This setup requires approximately 1 hour to complete.

To install Visual Studio 2008

  1. Start the Visual Studio 2008 Professional Edition installer, which starts automatically when you insert disk. If you download the software, double-click autorun.exe to start the installation.

  2. Select Visual Studio 2008 Professional Edition and accept all default installation settings until you see the Select features to install page. The Visual Studio 2008 Professional Edition installer also installs Microsoft Web Designer Tools, Microsoft .NET Framework 3.5, and Microsoft Document Explorer 2007.

  3. Under Select features to install, select Default, and then click Install.

    NoteNote

    If an error occurs during the .NET Framework 3.5 installation, check to see if the installation files are in a file path that contains a space. If so, move them to a path without a space and attempt the installation again.

  4. During the installation, you need to restart the computer. Click Restart Now and wait for the system to restart. Installation continues after the system restarts.

    NoteNote

    If the installation does not automatically restart, manually restart it by following Steps 1 through 3. The installation continues where it left off.

  5. Complete the installation wizard, accepting the default settings.

  6. Select Install Product Documentation and click through the wizard until you reach the Selection / Customization step. Select Minimum for the Setup Type.

  7. Complete the rest of the installation wizard, accepting the default settings.

Sample Projects Using Visual Studio 2008

Document-Level Office Word 2007 Add-in Sample

This sample project shows you how to add custom toolbar options that extend the capabilities of Office Word 2007. The project also demonstrates how Visual Studio 2008 Professional Edition can embed these extensions into the document. The add-in allows a user to change terms in a Word 2007 document.

The SampleWordDocument project (which is the document level add-in) and the SampleWordAddin (which is the application level add-in) are based on the same code. This shows the compatibility between Visual Studio 2008 Professional Edition project templates and previous Visual Studio 2005 project templates. You can develop and test application level add-ins and then convert them to document level add-ins easily.

To create a Ribbon extension using Visual Studio 2008

  1. Start Visual Studio 2008 Professional Edition.

  2. On the File menu, point to New and clickProject. The New Project dialog box appears.

  3. Under Project types, expand Visual C#, and then expand Office, click 2007, and double-click Word Document.

  4. In the Select a Document for Your Application wizard, name your document, and then click OK.

  5. In Solution Explorer, right-click the project, point to Add, and then click New Item. The Add New Item dialog box appears.

  6. Click Ribbon (XML) and then click Add.

    NoteNote

    You can choose Ribbon (Visual Designer). However, as of Visual Studio 2008 Professional Edition Beta 1, the only visual design components for the Ribbon are buttons, groups, and tabs. If your application requires other components, you need to use the Ribbon (XML) item.

  7. Follow the TODO note at the beginning of the Ribbon.cs implementation file and add the code block to the ThisDocument.cs file.

    NoteNote

    If you selected Ribbon (Visual Designer), you do not need to add anything to ThisDocument.cs because the Ribbon is automatically registered.

This creates a Ribbon Extensibility project that allows developers to add new tabs to a Microsoft Office program or add controls into existing areas of the application. The Ribbon.cs file contains the callback functions for your add-in, and the Ribbon.xml file defines the placement of your controls and associates them with their callback.

Developing Microsoft Office Solutions Using Virtual Machines

This article assumes that you develop Microsoft Office solutions using physical hardware. However, you can also develop Microsoft Office solutions using virtual machines if you run virtualization software such as Microsoft Virtual PC 2007 or Microsoft Virtual Server 2005 R2 SP1. This section contains tips to help you set up a development environment using Virtual PC or Virtual Server.

NoteNote

Throughout this section, host refers to the physical computer running the virtualization software and guest refers to the virtualized operating system.

Defragment Both the Host and Guest Operating Systems

When using a virtual computer, both the host and guest hard disks can become fragmented. As guest performance often depends on disk performance, disk fragmentation may decrease the guest's performance. For best performance, we recommend that you defragment both the host and client hard disks on a regular basis.

Use Separate Hard Disks for Both the Host and Guest

Poor disk throughput on the host can decrease the guest's performance. We recommend that you use a different physical disk for each virtual computer, and that you use a separate disk for the host operating system.

Allocate Enough Memory to the Guest Operating System

When you set up the virtual machine, allocate at least the minimum system memory noted in the System Requirements sections. If the guest operating system runs as the primary user task, consider giving the virtual computer most of the system memory of the host and run the virtual computer in full-screen mode. Be sure to leave enough unallocated memory for the host operating system or both host and guest performance are negatively affected.

Use Fixed Virtual Disks

Fixed virtual disks have many benefits: they perform better than dynamically expanding disks, they help limit host disk fragmentation, and they help avoid issues with running out of disk space on the host.

Disable Undo Disks

To improve virtual computer performance, disable undo disk support in the Virtual PC or Virtual Server setting for your guest. This also helps avoid issues with inappropriate rollbacks (usually when dealing with domain-joined guests). We recommend undo disks during installation and deployment testing when the need for a clean environment or the ability to return to a known good configuration is worth the performance tradeoff.

Conclusion

You are now ready to create projects based on the 2007 Microsoft Office system and build new solutions that use both the new client and server extensions in the platform.

Setting up a Microsoft Office system development environment gives you several advantages:

  • Quick and easy development of Microsoft Office program based solutions

    • Easy XML interface to the toolbar and ribbon layout

    • Ability to easily create a task pane that can be used across multiple programs

  • Intuitive tools to develop Microsoft Office based solutions

    • Designer integration of Workflow capabilities
  • Integrated solution development in a common framework

    • Using Web services to join the client and server in common solution

Additional Resources

For more information, see the following resources:

About the Authors

Alex Hart has over ten years of marketing, development, and system design expertise and an MBA in Information Technology Management. Formerly a Product Manager at Microsoft, Alex is now a marketing consultant for Solanite Consulting, Inc.

Keith Bunge and Bryan Hart are former software developers and development managers with nearly 25 years of combined experience in the Collaboration industry. Both are technical consultants for Solanite Consulting, Inc., creating many of the demonstrations and Hands-on Labs used by Microsoft for Microsoft Office SharePoint Portal Server 2003 and the 2007 Microsoft Office System.