pythonnet / clr-loader

Loader for different .NET runtimes
MIT License
32 stars 23 forks source link

RuntimeInfo.version '<undefined>' #44

Open cmdty opened 1 year ago

cmdty commented 1 year ago

Environment

Details

import pythonnet
import clr
pythonnet.get_runtime_info()
# Prints the following: 
# RuntimeInfo(kind='.NET Framework', version='<undefined>', initialized=True, shutdown=False)

Why does this show '\<undefined>' as the RuntimeInfo version? Is this a bug?

filmor commented 1 year ago

It is not a bug per se, it is just unimplemented, see: https://github.com/pythonnet/clr-loader/blob/master/clr_loader/netfx.py#L26-L34

PRs are welcome, it's probably enough to add a new function to the ClrLoader .NET project that returns the version data in a prepared string buffer.

cmdty commented 1 year ago

@filmor thanks, I've just taken a look at the code. I won't have time to create a pull request to fix this over the next few weeks at least, but if this is still outstanding I'll try to give it a go later.