Fix version info for onnxruntime.dll and QNN, TensorRT, and CUDA EP dlls - #24606
Merged
Conversation
adrianlizarraga
commented
Apr 30, 2025
jywu-mysoft
reviewed
May 1, 2025
jywu-mysoft
reviewed
May 1, 2025
Contributor
|
do we want to do this for only windows in the cmake file? |
jywu-mysoft
approved these changes
May 1, 2025
vraspar
pushed a commit
that referenced
this pull request
May 1, 2025
…lls (#24606) ### Description Fixes #24500 - Fixes local build of onnxruntime.dll to have a valid version, such as "1.23.0", instead of the literal string "ORT_VERSION" - Adds version info to onnxruntime_providers_qnn.dll, onnxruntime_providers_cuda.dll, and onnxruntime_providers_tensorrt.dll. It was missing completely. This was done by adding `onnxruntime_providers_*.rc` files to define each EP's [DLL version info](https://learn.microsoft.com/en-us/windows/win32/menurc/versioninfo-resource). Fixed onnxruntime.dll version info (local non-ADO build): <img width="263" alt="image" src="https://github.com/user-attachments/assets/33ef85ea-ac36-4c6a-9171-8fe4fb35955d" /> Fixed onnxruntime_providers_qnn.dll version info (adds QNN SDK version too): <img width="275" alt="image" src="https://github.com/user-attachments/assets/a1f04604-2e3c-416d-989e-e92cb7df1776" /> ### Motivation and Context We create dlls with invalid or missing version info.
jywu-mysoft
pushed a commit
that referenced
this pull request
May 1, 2025
### Description Cherry pick the following into [rel-1.22.0](https://github.com/microsoft/onnxruntime/tree/rel-1.22.0) - (#24491) - (#24509) - (#24564) - (#24574) - (#24582) - (#24584) - (#24568) - (#24587) - (#24563) - (#24592) - (#24526) - (#24552) - (#24588) - (#24605) - (#24606) --------- Co-authored-by: Jing Fang <126209182+fajin-corp@users.noreply.github.com> Co-authored-by: Tianlei Wu <tlwu@microsoft.com> Co-authored-by: Baiju Meswani <bmeswani@microsoft.com> Co-authored-by: Scott McKay <skottmckay@gmail.com> Co-authored-by: Mark Schofield <mschofie@microsoft.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com> Co-authored-by: Ashwath Shankarnarayan <quic_ashwshan@quicinc.com> Co-authored-by: saurabh <saurabh1.kale@intel.com> Co-authored-by: Adrian Lizarraga <adlizarraga@microsoft.com> Co-authored-by: Hector Li <hecli@microsoft.com>
ankitm3k
pushed a commit
to intel/onnxruntime
that referenced
this pull request
May 12, 2025
…lls (microsoft#24606) ### Description Fixes microsoft#24500 - Fixes local build of onnxruntime.dll to have a valid version, such as "1.23.0", instead of the literal string "ORT_VERSION" - Adds version info to onnxruntime_providers_qnn.dll, onnxruntime_providers_cuda.dll, and onnxruntime_providers_tensorrt.dll. It was missing completely. This was done by adding `onnxruntime_providers_*.rc` files to define each EP's [DLL version info](https://learn.microsoft.com/en-us/windows/win32/menurc/versioninfo-resource). Fixed onnxruntime.dll version info (local non-ADO build): <img width="263" alt="image" src="https://github.com/user-attachments/assets/33ef85ea-ac36-4c6a-9171-8fe4fb35955d" /> Fixed onnxruntime_providers_qnn.dll version info (adds QNN SDK version too): <img width="275" alt="image" src="https://github.com/user-attachments/assets/a1f04604-2e3c-416d-989e-e92cb7df1776" /> ### Motivation and Context We create dlls with invalid or missing version info.
Contributor
|
This PR has been included in the |
xhan65
added a commit
to xhan65/onnxruntime
that referenced
this pull request
Mar 11, 2026
Add a Windows VERSIONINFO resource (.rc file) for the Vitis AI provider DLL, following the same pattern used for CUDA, TensorRT, and QNN EPs (added in microsoft#24606). This embeds the ORT version into the DLL's PE header so it shows up in file properties. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
xhan65
added a commit
to xhan65/onnxruntime
that referenced
this pull request
Mar 11, 2026
Add a Windows VERSIONINFO resource (.rc file) for the Vitis AI provider DLL, following the same pattern used for CUDA, TensorRT, and QNN EPs (added in microsoft#24606). This embeds the ORT version into the DLL's PE header so it shows up in file properties. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
xhan65
added a commit
to xhan65/onnxruntime
that referenced
this pull request
Mar 11, 2026
Add a Windows VERSIONINFO resource (.rc file) for the Vitis AI provider DLL, following the same pattern used for CUDA, TensorRT, and QNN EPs (added in microsoft#24606). This embeds the ORT version into the DLL's PE header so it shows up in file properties. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
xhan65
added a commit
to xhan65/onnxruntime
that referenced
this pull request
Mar 11, 2026
Add a Windows VERSIONINFO resource (.rc file) for the Vitis AI provider DLL, following the same pattern used for CUDA, TensorRT, and QNN EPs (added in microsoft#24606). This embeds the ORT version into the DLL's PE header so it shows up in file properties. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
adrianlizarraga
pushed a commit
that referenced
this pull request
Mar 13, 2026
### Description Add a Windows VERSIONINFO resource (.rc file) for the Vitis AI provider DLL, following the same pattern used for CUDA, TensorRT, and QNN EPs (added in #24606). This embeds the ORT version into the DLL's PE header so it shows up in file properties. ### Motivation and Context Need version in onnxruntime_providers_vitisai.dll to track changes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Kevin-Taha
pushed a commit
that referenced
this pull request
Mar 16, 2026
### Description Add a Windows VERSIONINFO resource (.rc file) for the Vitis AI provider DLL, following the same pattern used for CUDA, TensorRT, and QNN EPs (added in #24606). This embeds the ORT version into the DLL's PE header so it shows up in file properties. ### Motivation and Context Need version in onnxruntime_providers_vitisai.dll to track changes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
adrastogi
pushed a commit
that referenced
this pull request
Mar 17, 2026
### Description Add a Windows VERSIONINFO resource (.rc file) for the Vitis AI provider DLL, following the same pattern used for CUDA, TensorRT, and QNN EPs (added in #24606). This embeds the ORT version into the DLL's PE header so it shows up in file properties. ### Motivation and Context Need version in onnxruntime_providers_vitisai.dll to track changes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
adrastogi
pushed a commit
that referenced
this pull request
Mar 19, 2026
### Description Add a Windows VERSIONINFO resource (.rc file) for the Vitis AI provider DLL, following the same pattern used for CUDA, TensorRT, and QNN EPs (added in #24606). This embeds the ORT version into the DLL's PE header so it shows up in file properties. ### Motivation and Context Need version in onnxruntime_providers_vitisai.dll to track changes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
skottmckay
pushed a commit
that referenced
this pull request
Jul 7, 2026
…29545) ### Description Official Windows DLLs embed the wrong version in their VersionInfo resource, for example File version 1.27.26.615 for the 1.27.0 release. The cmake fix from #24606 is intact but only covers local builds; official packages are produced by the ADO pipelines, which take a different path in tools/ci_build/build.py. When Build_BuildNumber and Build_SourceVersion are set, that branch stamps VERSION_BUILD_PART from the last two digits of the build year and drops the patch version from the version string entirely. I checked the shipped 1.22.0, 1.23.0, 1.26.0, and 1.27.0 Windows packages and all four carry the wrong version, so this path was never fixed. This change parses major.minor.patch from VERSION_NUMBER, stamps the real ORT version in the numeric FILEVERSION (keeping MMDD as the fourth part for build traceability; it fits a 16-bit WORD), and includes the patch in the version string, which becomes for example 1.27.0.20260615.4.8f0278c. Local builds are unaffected. One open question for reviewers: whether you would rather have the fourth numeric part be the pipeline revision or zero instead of MMDD. ### Motivation and Context Fixes #29536. Anyone inspecting DLL properties, or tooling that reads VersionInfo to identify the installed ONNX Runtime version, currently sees a build-date artifact instead of the actual release version. Verified by executing the pristine and patched stamping logic with the real 1.27.0 release inputs (the pristine output reproduces the issue exactly), and by compiling onnxruntime.rc with the Windows SDK rc.exe under both define sets and decoding VS_FIXEDFILEINFO from the .res: 1.27.26.615 before, 1.27.0.615 after. A full pipeline build was not run; confirming end to end means building with Build_BuildNumber and Build_SourceVersion set and checking the DLL's FileVersionRaw.
tianleiwu
pushed a commit
that referenced
this pull request
Jul 7, 2026
…29545) ### Description Official Windows DLLs embed the wrong version in their VersionInfo resource, for example File version 1.27.26.615 for the 1.27.0 release. The cmake fix from #24606 is intact but only covers local builds; official packages are produced by the ADO pipelines, which take a different path in tools/ci_build/build.py. When Build_BuildNumber and Build_SourceVersion are set, that branch stamps VERSION_BUILD_PART from the last two digits of the build year and drops the patch version from the version string entirely. I checked the shipped 1.22.0, 1.23.0, 1.26.0, and 1.27.0 Windows packages and all four carry the wrong version, so this path was never fixed. This change parses major.minor.patch from VERSION_NUMBER, stamps the real ORT version in the numeric FILEVERSION (keeping MMDD as the fourth part for build traceability; it fits a 16-bit WORD), and includes the patch in the version string, which becomes for example 1.27.0.20260615.4.8f0278c. Local builds are unaffected. One open question for reviewers: whether you would rather have the fourth numeric part be the pipeline revision or zero instead of MMDD. ### Motivation and Context Fixes #29536. Anyone inspecting DLL properties, or tooling that reads VersionInfo to identify the installed ONNX Runtime version, currently sees a build-date artifact instead of the actual release version. Verified by executing the pristine and patched stamping logic with the real 1.27.0 release inputs (the pristine output reproduces the issue exactly), and by compiling onnxruntime.rc with the Windows SDK rc.exe under both define sets and decoding VS_FIXEDFILEINFO from the .res: 1.27.26.615 before, 1.27.0.615 after. A full pipeline build was not run; confirming end to end means building with Build_BuildNumber and Build_SourceVersion set and checking the DLL's FileVersionRaw.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #24500
onnxruntime_providers_*.rcfiles to define each EP's DLL version info.Fixed onnxruntime.dll version info (local non-ADO build):

Fixed onnxruntime_providers_qnn.dll version info (adds QNN SDK version too):

Motivation and Context
We create dlls with invalid or missing version info.