Skip to content

FileNotFound error when SMO is not installed #1

Description

@dermeister0
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SqlServer.Smo, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.SqlServer.Smo, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'
   at DBVer.Program.ProcessDatabase(String dbName, String outputDir, String serverHost, String userName, String password)
   at DBVer.Program.Run(String[] args) in C:\Work\DBVer\src\DBVer\Program.cs:line 102
   at DBVer.Program.Main(String[] args) in C:\Work\DBVer\src\DBVer\Program.cs:line 35

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Solutions:

  1. Install SQL Server Management Object 2008 R2.

    https://www.microsoft.com/en-us/download/details.aspx?id=16978

    • Microsoft® System CLR Types for SQL Server® 2008 R2
    • Microsoft® SQL Server® 2008 R2 Shared Management Objects
  2. If you have SMO with newer version, edit assemblyBinding section in DBVer.exe.config.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions