If you need --vpp-onnx support, you must manually prepare the ONNX Runtime DirectML directory. This involves downloading the NuGet package, extracting it, and moving the necessary headers and libraries to a directory defined by the ONNXRUNTIME_DIR environment variable.
For x64 VCEEncC builds, onnxruntime.dll and onnxruntime_providers_shared.dll are automatically copied from %ONNXRUNTIME_DIR%\lib to the output directory.
set ONNXRUNTIME_DIR=F:\VisualStudio2022\Projects\onnxruntime
if not exist "%ONNXRUNTIME_DIR%" mkdir "%ONNXRUNTIME_DIR%"
if not exist "%ONNXRUNTIME_DIR%\include" mkdir "%ONNXRUNTIME_DIR%\include"
if not exist "%ONNXRUNTIME_DIR%\lib" mkdir "%ONNXRUNTIME_DIR%\lib"
curl -L -o onnxruntime-directml.nupkg https://api.nuget.org/v3-flatcontainer/microsoft.ml.onnxruntime.directml/1.23.0/microsoft.ml.onnxruntime.directml.1.23.0.nupkg
7z x -oonnxruntime-directml -y onnxruntime-directml.nupkg
xcopy /e /i /y onnxruntime-directml\build\native\include "%ONNXRUNTIME_DIR%\include"
copy /y onnxruntime-directml\runtimes\win-x64\native\onnxruntime.dll "%ONNXRUNTIME_DIR%\lib\"
copy /y onnxruntime-directml\runtimes\win-x64\native\onnxruntime.lib "%ONNXRUNTIME_DIR%\lib\"
copy /y onnxruntime-directml\runtimes\win-x64\native\onnxruntime_providers_shared.dll "%ONNXRUNTIME_DIR%\lib\"
setx ONNXRUNTIME_DIR "%ONNXRUNTIME_DIR%"