Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeInfo.version '<undefined>' #44

Open
cmdty opened this issue Dec 30, 2022 · 2 comments
Open

RuntimeInfo.version '<undefined>' #44

cmdty opened this issue Dec 30, 2022 · 2 comments

Comments

@cmdty
Copy link

cmdty commented Dec 30, 2022

Environment

  • Pythonnet version: 3.0.1
  • Python version: 3.7.1
  • Operating System: Windows 10
  • .NET Runtime: .NET Framework 4.8 is latest version installed.

Details

  • Describe what you were trying to get done.
    Determine the .NET Framework runtime version pythonnet is using.
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 filmor transferred this issue from pythonnet/pythonnet Dec 30, 2022
@filmor
Copy link
Member

filmor commented Dec 30, 2022

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
Copy link
Author

cmdty commented Dec 30, 2022

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants