-
Notifications
You must be signed in to change notification settings - Fork 1.4k
GetFileVersion v1 #12391
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
base: main
Are you sure you want to change the base?
GetFileVersion v1 #12391
Conversation
@dotnet-policy-service agree |
@@ -751,6 +752,25 @@ public static bool RegisterBuildCheck(string projectPath, string pathToAssembly, | |||
return false; | |||
} | |||
|
|||
public static string GetFileVersion(string filePath) | |||
{ | |||
if (string.IsNullOrEmpty(filePath)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add filePath validation and corresponding log messages to detect any issues
var pg = new PropertyDictionary<ProjectPropertyInstance>(); | ||
var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: extra line
Fixes #3457
Context
Attempt to create an intrinsic function which will retrieve a file's version.
Changes Made
Expander and Intrinsic functions received additions relating to this function.
Testing
Added intrinsic function tests and expander tests.
Notes
First time trying this.