Understanding the GAC: Starting with the question "Microsoft.SqlServer.SqlClrProvider.dll not found"

Source: Internet
Author: User

Understanding the GAC: Starting with the question "Microsoft.SqlServer.SqlClrProvider.dll not found" Sinomfirst, look at the truth, as follows:

First, the problem descriptionI used MICROSOFT.SQLSERVER.SMO to develop a database management tool to manage SQL Server based on customized requirements. The above error is prompted after deployment to the client. And this file on my computer using a full search, in any case also cannot search.
second, the tracedafter research, it is found that this file is a Runtime support library of SQLServer2012, which exists in Sqlsysclrtype.msi, as follows:    http://www.microsoft.com/zh-cn/download/details.aspx?id=43339

Contains two versions of x86 and x64, please use them according to your needs.

Iii. Methods of Use

Of course, we can install Sqlsysclrtype.msi to the client, in fact we only need this dynamic library file:

   microsoft.sqlserver.sqlclrprovider.dll in fact, we just need to deploy this file with our EXE to the client, but after installing Sqlsysclrtype.msi, we still can't find this dynamic library on this machine. This file was originally installed in the GAC of the system!!!

What is the GAC?to improve system security, Microsoft has added a new--uac (User account Control) to the Windows system since Vista was launched, a new technology that has constrained many operations, especially system settings, file modifications, Win7, as a derivative, is also protected by UAC. in. NET project development, for some class library projects or user control projects, when program development is complete, it is sometimes necessary to deploy the developed assembly to the GAC (Global Assembly Cache) so that other programs can also invoke it. in general, there are two ways to install an assembly to the GAC:1. Manually drag the assembly (DLL file) to the C:/windows/assembly folder. 2. Install using the command line or the Global Assembly Cache tool gacutil.

That's it !
The GAC directory is in c:\windows\assembly, and this directory is not allowed to copy and paste directly, only use the command line, you will find that the GAC's directory structure differs from the directory that Windows Explorer presents to you:


to get the files out, you need to use the command line:
     so you can get the dynamic library you need!!!  


Understanding the GAC: Starting with the question "Microsoft.SqlServer.SqlClrProvider.dll not found"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.