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

package main

import (
"fmt"
"io/ioutil"
"log"
"bytes"
"os"
)

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

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
Selvin

1 Like

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

2 Likes

Thanks a lot Yamil_Bracho

1 Like

Linux doesn’t use DLLs…

2 Likes

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

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

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