This documentation is archived and is not being maintained.

Properties in Visual Studio Tools for Office Projects

Note Required applications

The features in this topic are available only if you have the required applications installed.

For more information, see Features Available by Product Combination.

  • One of these development environments:

    VSTO 2005


    Visual Studio Team System

  • Microsoft Office 2003

There are several important properties that are available in Microsoft Visual Studio 2005 Tools for the Microsoft Office System projects. These properties can be accessed in the Properties window.

Trust Assemblies Location

The Trust Assemblies Location property appears in the Properties window when you select the project node in Solution Explorer.

This property takes a Boolean value:

  • Select true to update your security policy automatically with full trust permissions on the main project assembly and execution permission on assemblies in the \bin folder and its subfolders. These permissions are checked and granted with every build of the project.

  • Select false to prevent permissions from being granted automatically. If you built the project previously with Trust Assemblies Location set to true, all code groups that were generated for you are removed when you build again with the property set to false. Your project will not run unless you grant permissions to your code manually.

For more information about security, see Security Requirements to Run Office Solutions.


The CacheInDocument property appears in the Properties window when you select an instance of a DataSet in the Visual Studio designer. Only public members can be cached; ensure that the Modifiers property is set to Public if you want to cache a DataSet.

This property takes a Boolean value:

  • Select true to cache the dataset in the document.

  • Select false if you do not want the dataset to be cached in the document.

For more information about caching data, see Caching Data and Data in Office Solutions Overview.

Namespace for Host Item

The Namespace for Host Item property is only available for C# projects. It appears in the Properties window when you select the document node (the node with the .doc, .dot, .xls, or .xlt extension) in Solution Explorer.

When you create a project using C#, host items are given a namespace based on the name of the project. It is recommended that you not change this namespace by editing the code file directly. Use this property to change the namespace. When you use this property, the namespace is changed in the generated (hidden) code, as well as in the visible code file.

To change the namespace for the host item, set the name in the Namespace for Host Item property.


The Value2 property is only available for Excel applications. It appears under the Databindings property node in the Properties window when you select a NamedRange control on the worksheet designer.

Use the Value2 property in the Properties window to bind the Value2 property of the named range to a field in your data source.

See Also