Feature Request: Add System.Diagnostics.FileVersionInfo.GetVersionInfo() to "allow list" as Property Function
- Dominant language
- C#
- Stars
- 5.5k
- Forks
- 1.5k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 141
Description
### Steps to reproduce
Project file
```xml
```
### Expected behavior
Run
### Actual behavior
Build started 6/25/2018 7:20:06 PM.
Project "C:\Test\test.proj" on node 1 (default targets).
Start:
2018.06.25
C:\Test\test.proj(5,12): error MSB4212: Invalid static method invocation syntax: "[System.Diagnostics.FileVersionInfo]::GetVersionInfo('notepad.exe').FileVersion". The type "System.Dia
gnostics.FileVersionInfo" is either not available for execution in an MSBuild property function or could not be found.
Done Building Project "C:\Test\test.proj" (default targets) -- FAILED.
**Build FAILED**.
### Justification
My SDK is built in a strange way, in which, timestamp is not a reliable way to tracked incremental build nor updates. The solution is to either create a version.txt on disk that changes every run or get the version from an adjacent .dll or .exe. System.Diagnostics.FileVersionInfo offer such feature as a direct static call. It returns a string that represents the version.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.