Troubleshoot Assembly Errors When Installing SQL 2008 R2 on Windows

This week we will discuss how to troubleshoot different assembly errors that we get while troubleshooting install for SQL Server. I’ll focus this article more on SQL Server 2008 R2 and Windows 7 system. Before I start, I’ll explain what is an assembly on Windows. Wikipedia describes an assembly in the CLI, as a compiled code library used for deployment, versioning, and security. CLI assemblies can have version information, allowing them to eliminate most conflicts between applications caused by shared assemblies.

Assembly Errors while installing SQL on Windows

So let get into the troubleshooting portion of the article.

Most of the times, assembly errors occur due to the leftovers of a failed installed i.e. the install went half way through and did a roll-back. In such cases, we have to manually clean up the entries. It’s a little lengthy and seemingly complicated process, but I’ll try to make it as simple as I can. Before we start the process create a system restore point & create a backup of the registry. Please follow these articles to do that.

First of all, we have to remove any after over entries. If there isn’t any SQL installed on this machine, then just remove all the SQL entries from Programs & Features. If not, just remove SQL Server 2008 R2 and select the instance you are trying to install (Don’t remove anything else). If it’s not there, then leave it and let’s go to the next step.

The next step is going through the registry to make sure all the entries are remove. To be honest, it’s practically impossible to search and delete all the SQL entries, but we can delete only the important ones that we think will cause problems.

    • Start –> Run –> Regedit
    • Go to

32-bit: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\
64-bit: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SQL Server\

  • Delete the entries for the SQL instance you are tying to install. In case if you don’t have any other SQL then just delete Microsoft SQL Server root folder itself
  • Now go to HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Eventlog\Application and delete entries for the SQL instance you are tying to install
  • Then go to HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\ and delete entries for the SQL instance you are tying to install
  • You will find multiple control sets like ControlSet001, ControlSet002, ControlSet003, ControlSet004 and so on. Repeat the same process.
  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application and delete entries for the SQL instance you are tying to install
  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services and delete entries for the SQL instance you are tying to install.

Now the next step is to remove the assembly entries for SQL. To do that

  • Start –> Run –> assembly
  • Look for assemblies started with Microsoft.SqlServer, once you find it right click and click on Uninstall

Now just to be sure you got all the entries there is a trick where can we switch the assembly view to folder view.

  • In command prompt, type cd /d %windows%\assembly
  • Type: attrib -r -h -s desktop.ini
  • Type ren desktop.ini desktop.bak

Or

  • Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion
  • Add new binary value name “DisableCacheViewer
  • Right click on “DisableCacheViewer” and click on Modify
  • Enter 1
  • Close the registry and try again

Now if you go back to assembly you should be folder views rather than assembly view. Now search for any Microsoft.SqlServer and remove it. Once you complete the process just clear the TEMP and reboot the system and try to install it again.

Now in some cases you might still get assembly error, most cases it’s due to Microsoft .NET 4.0. I would recommend to reinstall the .NET Frameworks 4.0 and try to install it again. Also Microsoft Visual C++ 2008 or 2010 might also cause such errors. Reinstalling them would be a good idea.

There is another scenario where the error is caused by  Microsoft SQL Server 2008 R2 RsFx Driver MSI. In such cases we can try two things. One is to create a missing entry in the registry or to remove the driver from Installer folder.

Method 1:

  • Start –> Run –> Regedit
  • Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RsFx0150
  • Right-click on the RsFX0150 and click on New key and type in InstancesShares
  • Now close the registry and try to install it again.

Method 2:

  • Start –> Run –> Installer
  • Once the folder open you’ll send lot of columns, Right click on any of the column names and select More
  • From the list select Comments and click OK.
  • Now look for Microsoft SQL Server 2008 R2 RsFx Driver MSI in comments (Because the actual file name will be gibberish)
  • Right click on the MSI file and click on Uninstall

Well using these method you should be able to resolve most of the assembly related errors when installing Microsoft SQL Server 2008 R2. In case if you still have problem you could use our comments section.

Posted by on , in Category General with Tags
Shyam aka “Captain Jack” is a Microsoft MVP alumnus and a Windows Enthusiast with an interest in Advanced Windows troubleshooting. Suggestions made and opinions expressed by him here are his personal one's and not of his current employers. He blogs at captaindbg.com.