Some customizations may stop working after an update to .NET Framework 2.0 is installed

The Common Language Runtime stores User security policy in a location based on the CLR version number. Updates to the Microsoft .NET Framework 2.0 update the CLR version number when they are installed, which causes the CLR to check for policy in a different folder. Because the new folder contains default User security policy, any changes that have been made to User security policy for the earlier version number are hidden.

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.

Work-around

Follow these instructions to re-enable any disabled VSTO customizations on end user computers.

Repair the customization

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.

Reapply User Security Policy and Re-enable Add-ins

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

Excel 2003, PowerPoint 2003, Visio 2003, & Word 2003

· 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”.

Outlook 2003

· 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 “OK”.

· Click “OK”.

· Click “OK”.

Excel 2007, PowerPoint 2007, & Word 2007

· 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”.

· Select the add-ins you want to re-enable in the “COM Add-Ins” dialog.

· Click “OK”.

InfoPath 2007, Outlook 2007, & Visio 2007

· 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”.

· Select the add-ins you want to re-enable in the “COM Add-Ins” dialog box.

· Click “OK”.

Comments

  • Anonymous
    August 21, 2007
    PingBack from http://testsubdomain.netmoviehost.com/some-customizations-may-stop-working-after-an-update-to-net/

  • Anonymous
    October 22, 2008
    Hi,   I created a word 2007 Document template project in vs2008.  I created a custom ribbon with some controls.  Then I created a setup project and added the above project to the primary output section.  I run this setup file from my local machine and everything works fine.  I am able to see my customized ribbon tab when opening that word document.   The same procedure I followed in a remote machine in the network.  It installed successfully and the word document opened.  My custom ribbon got created along with my controls.  But the issues are:

  1. The label of the ribbon tab doesn't show up
  2. Inside my custom ribbon I am having a dropdown list, which takes values from a SharePoint list.  But it’s not populating those values from the SharePoint list.   Thanks for your valuable suggestions in advance C.N.Siva
  • Anonymous
    November 13, 2008
       HTML Tags in Word RichTextContentControl:    I am dynamically creating  a richtextcontentcontrol using VSTO (Word 2007). The text that is set to the control will be something like “<div><b>Data</b></div>”. I expect the richtextcontentcontrol to detect the HTML tags and display the text with HTML formatting, but that is not the case. It simply displays the text with HTML tags.    Here is the source code:    Microsoft.Office.Tools.Word.RichTextContentControl customControl  =  Globals.ThisDocument.Controls.AddRichTextContentControl(contentRange, name);    customControl.Text = "<div><b>Data</b></div>";    Please let me know if I am doing something wrong here and if there is any alternate solution.    This is an urgent requirement. Please help me out.    Thanks in advance    C.N.Siva