Changes to default User security policy can include changes to the default permission sets and the addition of code groups to trust particular assemblies or locations.
Visual Studio Tools for Office (VSTO) customizations installed on end user computers that rely on User security policy for trust may stop working after an update to the .NET 2.0 Framework has been installed. If Office attempts to load an application add-in that is not trusted, the loading process fails and the add-in is disabled. VSTO customizations trusted with Machine or Enterprise policy are unaffected.
Visual Studio 2005 sets User security policy on the development computer when you debug a project. Re-opening and re-building your solutions should restore User security policy on your development computer.
A future service pack for the .NET Framework 2.0 will reset the location of User Security policy to the original location used when .NET 2.0 Framework is installed.
Follow these instructions to re-enable any disabled VSTO customizations on end user computers.
Repairing the installation might reapply User security policy and re-enable the customization. In Add or Remove Programs, select the customization and click the Repair option.
Any other changes made to User security policy, for example, changes to the default permission set, will still need to be re-applied by using a different method.
Follow these steps to enable end users to run VSTO customizations:
1. Reapply User security on end users' computers.
2. Re-enable your add-in on end users' computers, if the add-in has been disabled by Office.
Reapply User Security Policy
Reapply security either by running the appropriate CASPOL commands or by copying the security.config file from its original location to the new location.
The User Security policy file is stored in %appdata%\Microsoft\CLR Security Config\v2.0.50727.nnn. By default, nnn = 42 for Windows XP and 312 for Windows Vista. You can find the actual version of the .NET Framework that is installed by inspecting the version of mscorwks.dll. Right click %windir%\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll and select the Version tab.
Re-enable Add-ins
· On the “Tools” menu, click “Customize”.
· Click the “Commands” tab in the “Customize” dialog box.
· Click “Tools" in the “Categories” list.
· Drag the “Com Add-Ins…” label from the “Commands” list and drop it between the “Customize…” and “Options….” commands on the "Tools" menu.
· Click "Close".
· Click the new “COM Add-Ins…” command on the “Tools” menu.
· Select the add-ins you want to re-enable in the “COM Add-Ins” dialog box.
· Click “OK”.
· On the “Tools” menu, click “Options”.
· Click the “Other” tab in the “Options” dialog box.
· Click the “Advanced Options…” button.
· Click the “COM Add-Ins…” button.
· Select the add-ins you want to re-enable in the “COM Add-Ins” dialog.
· Click the Microsoft Office Button (in the top left corner), and then click “<app-name> Options”.
· Click “Add-Ins” in the “<app-name> Options” dialog box.
· At the very bottom of the “<app-name> Options” dialog box, in the list next to the “Manage” label, click “COM Add-ins”, and then click “Go”.
· On the “Tools” menu, click “Trust Center”.
· Click “Add-ins” in the “Trust Center” dialog box.
· At the very bottom of the “Trust Center” dialog box, in the list next to the “Manage” label, click “COM Add-ins”, and then click “Go”.