开发者

How can i see the assembly version of a .NET assembly in Windows Vista and newer (WIndows 7, 2008)?

In windows 2003 and windows XP you could right click on an assembly (.dll) go to properties, click on the version tab and then you would see 3 different version numbers: Assembly version, file version and product version.

If you take that same file and look at its properties in windows 2008, you will only see file version and product version.

Is there a way to see the assembly version of a .NET assembly in windows vista and newer (without third par开发者_如何学运维t tools)?


No. Not from explorer. It is an intentional move by Microsoft (although I dislike it).

You can from powershell though:

[Reflection.AssemblyName]::GetAssemblyName('full-path-to\xxxx.dll').Version

Also if file version is not explicitly set it will default to assembly version.

Here is some info: http://all-things-pure.blogspot.com/2009/09/assembly-version-file-version-product.html


Take a look at https://github.com/ssidpat/powerext

I know this is way late but I found this question when trying to find the extension again so others may find it too...


You can always write a Shell Extension to add a property page to File Properties like it has been done here http://sbytestream.pythonanywhere.com/software/asmprops


In Windows 7 Enterprise you can use windows explorer to right-click the assembly, click properties, then click the Details tab.

The property "Product version" has the assembly version formatted as major.minor.build#.revision#. The property "File version" has it too.

Not sure if this works in other versions of Windows 7.


Thanks to Ramesh Srinivasan, there's at least a way to add the file version to the Details pane of the explorer window. Add a string value to HKEY_CLASSES_ROOT\dllfile named PreviewDetails with the value prop:System.FileVersion;System.FileDescription;System.DateModified;System.Size‌​. That way if you are dealing with assemblies where the file version matches the assembly version, as Jerome suggested, at least you can see it just by selecting the assembly. I couldn't find anywhere where the available system file properties are documented.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜