How can I load a DLL to GAC? Oracle was a problem. dataaccess. DLL problem. 10 Gb is installed on the sub-host, but later we know the oracle. dataaccess. dll contains a new method oraclebulkcopy, similar. net is used for SQL Server sqlbulkcopy. At that time, I wanted to use the DLL directly, but I wrote an example.ProgramAn error occurs during running, that is, the DLL must be registered in GAC. That is depressing. It may be because I was too dull. Later I thought of an error that may be caused by the inconsistency between the Oracle. dataaccess. dll version in GAC and the reference in the program.
In fact, a tool provided by. Net can register the DLL to GAC. It has never been noticed before. Gacutil.exe. Start Menu-Microsoft Visual Studio-Visual Studio Tools-Visual Studio 2008 command prompt, enter gacutil.exe in the console and press enter, you can see some parameters.
To install the DLL to GAC, select the-I parameter, followed by the complete path of the DLL file.
For example:
Gacutil.exe-I E: \ ODP. Net \ bin \ 2. x \ oracle. dataaccess. dll
In this case, the DLL is registered in the GAC. The bad thing is that the path cannot be changed. A better alternative is to copy the DLL directlyC: \ windows \ assemblyUnder this directory, register again.
If you want to know some information about a DLL registered to GAC, such as version, culture, and publickeytoken, you can also use gacutil.exe-L to view the information. For more information, see the figure above.
Hey, you can register the DLL in the GAC. It saves a lot of trouble.
I hope it will be useful to you. If it is useless, I should forget it myself,