Could not load file or assembly ‘Microsoft.SqlServer.Diagnostics.STrace’

  • Post last modified:June 24, 2016
  • Post category:SQL Server
  • Post comments:1 Comment
  • Reading time:1 mins read

You may receive the following error while starting SQL server 2008 Management Studio:

The type initializer for 'Microsoft.SqlServer.Management.Dmf.PolicyStore' threw an exception. (Microsoft.SqlServer.Dmf)
Could not load file or assembly 'Microsoft.SqlServer.Diagnostics.STrace, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.

In most cases, uninstalling Visual studio and .Net 4 and reinstalling them fix the problem. In case if it does not resolve the issue you can follow the below steps to resolve this error:

1. Run Command Prompt and find the location of the DLL file using the following command:

dir Microsoft.SqlServer.Diagnostics.STrace.dll /s

2. Copy the location with the DLL name.

3. Run VS 2008 Command Prompt as Administrator.

4. Execute the following

GACUTIL –i “{Location of Microsoft.SqlServer.Diagnostics.STrace.dll} found at step 1”

If the DLL file Microsoft.SqlServer.Diagnostics.STrace.dll is missing on your system, you may, however, copy it from other working system.

Hopefully this should resolve the error.

This Post Has One Comment

  1. dixie617

    There is another solution I just completed and is faster and easier for this error. I am running SQL 2008 and got the same error:

    Resolution :

    To resolve this issue I have installed SharedManagementObjects.msi (X86) from Microsoft, you can download the file from the below link.

    http://go.microsoft.com/fwlink/?LinkID=188438&clcid=0×409

Leave a Reply