Skip to content

Fix version info for onnxruntime.dll and QNN, TensorRT, and CUDA EP dlls - #24606

Merged
adrianlizarraga merged 7 commits into
mainfrom
adrianl/ort-dll-version-fix
May 1, 2025
Merged

Fix version info for onnxruntime.dll and QNN, TensorRT, and CUDA EP dlls#24606
adrianlizarraga merged 7 commits into
mainfrom
adrianl/ort-dll-version-fix

Conversation

@adrianlizarraga

@adrianlizarraga adrianlizarraga commented Apr 30, 2025

Copy link
Copy Markdown
Contributor

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.

Fixed onnxruntime.dll version info (local non-ADO build):
image

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

Motivation and Context

We create dlls with invalid or missing version info.

Comment thread onnxruntime/core/providers/qnn/onnxruntime_providers_qnn.rc Outdated
@adrianlizarraga adrianlizarraga changed the title Fix onnxruntime.dll and onnxruntime_providers_qnn.dll version info Fix version info for onnxruntime.dll and QNN, TensorRT, and CUDA EP dlls Apr 30, 2025
Comment thread cmake/onnxruntime_providers_cuda.cmake
Comment thread cmake/onnxruntime_providers_cuda.cmake Outdated
@jywu-mysoft

Copy link
Copy Markdown
Contributor

do we want to do this for only windows in the cmake file?

@adrianlizarraga
adrianlizarraga merged commit 9194cad into main May 1, 2025
@adrianlizarraga
adrianlizarraga deleted the adrianl/ort-dll-version-fix branch May 1, 2025 06:31
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.
@snnn

snnn commented Sep 5, 2025

Copy link
Copy Markdown
Contributor

This PR has been included in the rel-1.22.0 branch. Removing the release:1.22.0 label.

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

Successfully merging this pull request may close these issues.

[Build] The version info of onnxruntime dlls is not set correctly

3 participants