简体   繁体   中英

C# assembly - get path where it was before being registered with gacutil

Is there any way to get the path of an assembly registered with gacutil /i myassembly.dll ?

I mean the path where the .dll file was at the moment it was registered with this command. All that I get right now is the path in the GAC

No. When you register an assembly in GAC, gacutil makes a copy of the dll in Windows\\assembly (or Windows\\Microsoft.NET\\assembly for .NET 4.0). It doesn't keep any info on the location of the original assembly.

EDIT: You can however add a custom trace to your assembly when installing, using /ir option instead of /i

gacutil /ir myassembly.dll OPAQUE "Custom application details" "Custom description"

and then retrieve the details using /lr option

gacutil /lr myassembly.dll

More info on tracing here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM