How to force download assembly?

I developed a console utility that performs some operations with a server application. Due to the nature of the server application I'm working with, I need to run this utility on the server.

The problem is that the utility refers to a shared DLL that was previously deployed to the GAC server. Since the deployment of the common DLL, it has been updated, and my utility uses these updates. I cannot update the DLL in the GAC due to company policy regarding deployment.

By default, my utility will use an obsolete DLL in the GAC. Is there a way to force it to use the updated DLL (for example, by specifying a path in the file system)?

+3
source share
6 answers

Unfortunately, the GAC tends to play a trump card - but if you change the version, then the GAC solution should fail (if you have a "Specific version" set to true in the IDE), which allows you to download the local version?

+3
source

Does the updated DLL not have a new version number? I would expect that if you make the link use the correct version number, it should pick up the local one.

+3
source

Assembly .

Assembly.LoadFrom

EDIT: , . .

+2

foson, . ( publicKeyToken, , href ).

<runtime> 
 <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 
  <dependentAssembly> 
     <assemblyIdentity name="myCommonDll" publicKeyToken="32ab4ba45e0a69a1" culture="neutral" />
     <codeBase version="2.0.0.0" href="file://C:\Users\djpiter\Documents/myCommon.dll"/>
  </dependentAssembly> 
 </assemblyBinding> 
</runtime> 

, CLR DLL GAC , href. dll , GAC , , publickeytoken, . . . .

+1
0

<codebase> app.config

0
source

Source: https://habr.com/ru/post/1703681/


All Articles