Skip to content

Comments

IDecompilationService - Use Assembly.GetName().Version rather than FileVersionInfo.GetVersionInfo#82490

Open
MattParkerDev wants to merge 1 commit intodotnet:mainfrom
MattParkerDev:use-assembly-version
Open

IDecompilationService - Use Assembly.GetName().Version rather than FileVersionInfo.GetVersionInfo#82490
MattParkerDev wants to merge 1 commit intodotnet:mainfrom
MattParkerDev:use-assembly-version

Conversation

@MattParkerDev
Copy link
Contributor

FileVersionInfo.GetVersionInfo requires a path to an assembly on disk. This fails in cases where the assembly has been loaded as a stream, rather than from a file.

This replaces it with Assembly.GetName().Version, which I have verified returns the same string, in this case, for ICSharpCode.Decompiler - "9.1.0.7988".

This will also improve performance (probably unnoticeably), as it doesn't need to read the assembly details from disk.

@MattParkerDev MattParkerDev requested a review from a team as a code owner February 21, 2026 16:17
@dotnet-policy-service dotnet-policy-service bot added Community The pull request was submitted by a contributor who is not a Microsoft employee. VSCode labels Feb 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Compilers Community The pull request was submitted by a contributor who is not a Microsoft employee. VSCode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant