Get dll info like file version, product version using golang which should work in both linux and windows

(Selvin Thangadurai) #1
package main

import (

func main() {
	content, err := ioutil.ReadFile("F:/tesdll/Microsoft.AspNetCore.Authentication.Abstractions.dll")
	if err != nil {

By reading the dll information i should be to get the dll file version and product version.
which should work seamlessly in windows and linux.

Thanks in advance

(Yamil Bracho) #2

You can inspect inside the content where that information is located.
Each DLL have a special information inside called StringFileInfo and then search for tags like ProductVersion and FileVersion

(Selvin Thangadurai) #3

Thanks a lot Yamil_Bracho

(George Calianu) #4

Linux doesn’t use DLLs…

(Yamil Bracho) #5

In this case I meant A library loaded dynamically (as a .so file)

(Selvin Thangadurai) #6

my code will run in linux Machine but reading the dll file…

(system) closed #7

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.