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.
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
Download Microsoft .NET Framework 3.0.
Note This package is not required on a Windows Vista development system.
Download Windows SDK for Vista and .NET Framework 3.0.
Note 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.
Install the Microsoft .NET Framework 3.0. During the installation, accept all of the default installation settings.
Note This package is not required on a Windows Vista development system.
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.
Note |
---|
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
Start the Visual Studio 2005 installer, which starts automatically when you insert the installation disk.
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.
Under Select features to install, choose Default, and then click Install.
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.
Note If the installation does not automatically restart, manually restart it by following Steps 1 through 3. The installation continues where it left off.
Complete the installation wizard, accepting the default settings.
Select Install Product Documentation and click through the wizard until you reach the Selection / Customization step. Select Minimum for the Setup Type.
Complete the rest of the installation wizard, accepting the default settings.
Download Visual Studio 2005 Extensions for Windows Workflow Foundation.
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 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
Download Visual Studio 2005 SP1.
Note If your development environment runs Windows Vista, download Visual Studio 2005 Service Pack 1 Update for Windows Vista.
Install Visual Studio 2005 SP1. During the installation, accept all of the default installation settings.
Note 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
Start the 2007 Microsoft Office programs installer, which starts automatically when you insert the installation disk.
Enter your product key and click Continue.
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.
Note |
---|
Skip this section if you install Visual Studio 2008 Professional Edition. |
This setup requires approximately 30 minutes to complete.
To install Visual Studio 2005
Download Microsoft Visual Studio 2005 Tools for the 2007 Microsoft Office System.
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.
Note |
---|
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
Start Visual Studio 2005.
On the File menu, point to New and click Project. The New Project dialog box appears.
Under Project types, expand Visual C#, then expand Office and click 2007Add-ins.
Under Templates, click Word Add-in.
On the Projectmenu, click WordAddIn1 Properties. Click Debug, then select Start an external program. Click the ellipsis button and browse to Word 2007.
In Solution Explorer, right-click the project, point to Add, and click New Item. The Add New Item dialog box appears.
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
Start Visual Studio 2005.
On the File menu, point to New and click Project. The New Project dialog box appears.
Under Project types, expand Visual C#, then expand Office, and click 2007 Add-ins.
Under Templates, click Word Add-in.
On the Projectmenu, click WordAddIn1 Properties. Click Debug, then select Start an external program. Click the ellipsis button and browse to Word 2007.
On the Project menu, click Add User Control.
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
On the Start menu click Control Panel and then double-click Add or Remove Programs.
In the Add or Remove Programs dialog, click Add/Remove Windows Component.
In the Windows Components Wizard, double-click Application Server.
In the Application Server dialog box, select ASP.NET.
In the Application Server dialog box, double-click Internet Information Services (IIS).
In the Internet Information Services (IIS) dialog, select SMTP Service.
Click OK to confirm the selections. Click Next to install the components.
Start the Internet Information Services (IIS) Manager. On the Start menu, click Administrative Tools, and then click Internet Information Services (IIS) Manager.
Expand the local computer and Web Sites. Right-click Default Web Site.
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
Insert the Microsoft SQL Server 2005 Developer, Standard, or Enterprise Edition CD into the drive.
Click Install and then select Server Components.
Follow the prompts to create a new instance of SQL Server on your local computer.
Accept the default settings and click Next until you are prompted to enter the components to install.
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.
Install using the default instance.
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
On the subsequent screens, accept the defaults and click Nextuntil you reach the Install screen.
At the end of setup, click Finish.
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
Download Microsoft .NET Framework 3.0.
Note This package is not required on a Windows Vista development system.
Download Windows SDK for Vista and .NET Framework 3.0.
Note 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.
Install the Microsoft .NET Framework 3.0 as described earlier in System Setup. During the installation, accept all of the default installation settings.
Note This package is not required on a Windows Vista development system.
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.
Note |
---|
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
Start the Visual Studio 2005 installer, which starts automatically when you insert the disk into the drive.
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.
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
Complete the installation wizard, accepting the defaults. Ignore the Office Dependency Warning at the end of the installation.
Select Install Product Documentation, and then select Minimum.
Download Visual Studio 2005 Extensions for Windows Workflow Foundation.
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 **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.
Download Visual Studio 2005 SP1.
Note If your development environment runs Windows Vista, download Visual Studio 2005 SP1 Update for Windows Vista.
Install Visual Studio 2005 SP1. During the installation, accept all of the default installation settings.
Note 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. For more information, see FIX: Error message when you try to install a large Windows Installer package or a large Windows Installer patch package in Windows Server 2003 or in Windows XP: "Error 1718. File was rejected by digital signature policy".
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 the Repair option in Add/Remove programs for Visual Studio 2005.
Other installation problems. Less common installation problems are documented in the Installation Issues – All Platforms section of the Visual Studio 2005 Service Pack 1 Release Notes.
Installing SharePoint Products and Technologies
This setup requires approximately 30 minutes to complete.
To install Office SharePoint Server 2007
Start either the Office SharePoint Server 2007 or Windows SharePoint Services 3.0 installation by clicking setup.exe.
On the Read the Microsoft Software License Terms screen, select I accept the terms of this agreement, and then click Continue.
On the Choose the installation you want screen, click Advanced.
On the Server Type screen, select Complete, and then click Install Now.
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 |
---|
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.
Windows SharePoint Services 3.0 Tools: Visual Studio 2005 Extensions, Version 1.1.
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
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.
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
Note In a production environment, you should create a user account to manage the database connections.
Complete the configuration, accepting the defaults.
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.
Click the Application Management tab to open the Application Management page.
Click Create or extend Web application.
Click Create a new Web Application.
Complete the Create New Web Application form using the information in the Figures 3, 4, and 5.
Figure 3. Setting the IIS options
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
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
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
Do not change the default values for the remaining options; click OK to create the Web application.
After the Web application is created, you are directed to the Application Created page. Click Create Site Collection.
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.
Click OK to create the site collection.
Click Operations, and then click Incoming e-mail settings.
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
Download the Windows SharePoint Services 3.0: Software Development Kit (SDK).
Download the Office SharePoint Server 2007 SDK.
Note 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.
To install the SDK, click the downloaded MSI. 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.
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
Start Visual Studio 2005.
On the File menu, point to New and click Project. The New Project dialog box appears.
In the Project Type section expand Visual C#, and then select SharePoint.
In the Templates section select SharePoint Sequential Workflow Library, and then click OK.
On the Project menu, select SharePointWorkflowLibrary1 Properties.
Select Signing and ensure Sign the Assembly is selected.
Under Choose a strong name key file, in the list, select New.
In the Key file name box, enter sample and then unselect Protect my key file with a password.
Click OK.
By default, only the common Workflow tasks appear in the toolbox. To add the SharePoint Workflow tasks:
Right-click the Toolbox, and then click Choose Items.
Click the Activities tab, and then browse to: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\ISAPI\microsoft.sharepoint.WorkflowActions.dll.
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
Start Visual Studio 2005.
On the File menu, point to New and click Project. The New Project dialog box appears.
In the Project Type section, expand Visual C#, and then select Windows.
In the Templates section, select Class Library, and then click OK.
On the Project menu, click ClassLibrary1 Properties.
Select Signing and ensure Sign the Assembly is selected.
Under Choose a strong name key file, in the list, select New.
In the Key file name box, enter sample and then unselect the Protect my key file with a password.
Click OK.
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
Start Visual Studio 2005.
On the File menu, point to New, and then click Project. The New Project dialog box appears.
In the Project Type section expand Visual C#, and then select SharePoint.
In the Templates section select Web Part, and then click OK.
On the Project menu, click ClassLibrary2 Properties. Click Debug, and then select Start browser with URL.
Note You need to set this to the URL of the SharePoint site that you want to debug.
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
Start Visual Studio 2005
On the File menu, point to New and click Project. The New Project dialog box appears.
In the Project Type section expand Visual C#, and then select SharePoint.
In the Templates section select List Definition, and then click OK.
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.
On the Project menu, click ClassLibrary2 Properties. Click Debug, and then select Start browser with URL.
Note You need to set this to the URL of the SharePoint site that you want to debug.
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 |
---|
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
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.
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.
Under Select features to install, select Default, and then click Install.
Note 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.
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.
Note If the installation does not automatically restart, manually restart it by following Steps 1 through 3. The installation continues where it left off.
Complete the installation wizard, accepting the default settings.
Select Install Product Documentation and click through the wizard until you reach the Selection / Customization step. Select Minimum for the Setup Type.
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
Start Visual Studio 2008 Professional Edition.
On the File menu, point to New and clickProject. The New Project dialog box appears.
Under Project types, expand Visual C#, and then expand Office, click 2007, and double-click Word Document.
In the Select a Document for Your Application wizard, name your document, and then click OK.
In Solution Explorer, right-click the project, point to Add, and then click New Item. The Add New Item dialog box appears.
Click Ribbon (XML) and then click Add.
Note 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.
Follow the TODO note at the beginning of the Ribbon.cs implementation file and add the code block to the ThisDocument.cs file.
Note 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.
Note |
---|
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:
Office Development Center. Provides information relating to developing Office solutions for both client and server.
Microsoft Office Virtual Labs. Lab exercises focused around the Microsoft Office system.
Windows Workflow Foundation. Articles related to the Workflow engine and API.
SharePoint Server on Office Online. Product and technical information about SharePoint Server.
2007 Office Suites Technical Articles. Technical articles related to the 2007 Microsoft Office system.
Solutions Overview. Technical overview of the Solutions package format.
Source Control for Visual Studio. Technical overview of the source control operations available in Visual Studio 2005.
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.