
Security During the Build Process
Visual Studio automatically configures the security settings on the development computer to grant trust to the solution during the build process. This allows the solution to run while you debug it. Security configuration is handled differently in projects for the different versions of Office.
2007 System Projects
For 2007 Microsoft Office system projects, Visual Studio Tools for Office uses an inclusion list and certificates to verify the publisher. Visual Studio automatically creates a temporary certificate to identify Office solutions, and adds an entry to the inclusion list to trust that certificate.
For more information, see Security in Office Solutions (2007 System).
2003 System Projects
For Microsoft Office 2003 projects, Visual Studio Tools for Office includes a Boolean property called Trust Assemblies Location. This property appears in the Properties window in Visual Studio. By default, this property is set to True. If the property is set to True, when you build the project, Visual Studio grants full trust to the project assembly by using the URL as evidence.
Full trust permissions are also granted to referenced and satellite assemblies that are in the output folder. Trust is granted at the User level for assemblies that are on the local computer. Therefore, you do not need administrative credentials for those projects. If you rebuild the project in a different location, the full trust permissions for the old location are removed. For more information about security, see Security Requirements to Run Office Solutions (2003 System).
Checking the location and granting trust at each build enables you to move projects and share projects without having to change the security configuration of the computer manually every time. However, you must use the tools provided by Visual Studio to change the project location. If you use an external tool, such as Windows Explorer, Visual Studio is not able to update the permissions.
Network Projects
If the assembly or document location is on a network share, the local (User level) security policy update is not enough to allow the solution to run. An administrator must grant full trust at the Machine level to assemblies and documents that are on a network share before the solution will run. For more information about how to set security policy, see How to: Grant Permissions to Folders and Assemblies (2003 System).
For 2007 system document-level projects, you must also add the fully qualified location of the document to the Office trusted folders list. For more information, see Granting Trust to Documents (2007 System).