Getting the PublicKeyToken of .Net assemblies

前端 未结 13 1132
忘掉有多难
忘掉有多难 2020-11-30 16:57

What is the simplest way to find the Public-Key-Token of an assembly?

The simplest way I can think of would be a simple right-click, get public key, but this functio

13条回答
  •  南笙
    南笙 (楼主)
    2020-11-30 17:48

    another option:

    if you use PowerShell, you can find out like:

    PS C:\Users\Pravat> ([system.reflection.assembly]::loadfile("C:\Program Files (x86)\MySQL\Connector NET 6.6.5\Assemblies\v4.0\MySql.Data.dll")).FullName
    

    like

    PS C:\Users\Pravat> ([system.reflection.assembly]::loadfile("dll full path")).FullName
    

    and will appear like

    MySql.Data, Version=6.6.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d

提交回复
热议问题