-
Notifications
You must be signed in to change notification settings - Fork 63
Setting Up Environment To Debug In To onnxruntime.dll
-
Checkout a copy of the
onnxruntimerepository.git clone --recursive https://github.com/Microsoft/onnxruntime -
Open an instance of
VS2017 Developer Command Prompt. -
Make sure that
cmake>=3.13andpython>=3.6is in the path. -
If required, checkout a specific tagged version of onnxruntime.
git checkout -b v1.0.0 v1.0.0 -
Build the core code base.
cd onnxruntime build.bat --config Debug --build_shared_lib --build_csharp --skip_onnx_tests --skip-keras-test
-
Build the Microsoft.ML.OnnxRuntime nuget package.
cd csharp msbuild OnnxRuntime.csharp.proj msbuild /t:CreatePackage OnnxRuntime.csharp.proj
The nuget package should be located in
[YOUR_ONNXRUNTIME_REPO_ROOT]\csharp\src\Microsoft.ML.OnnxRuntime\bin\Debug. Note, the version of the nuget package (ie. "1.0.0-dev-20200131-1133-b783805f"). -
Open
[YOUR_MLNET_REPO_ROOT]\build\Dependencies.propsand update the ONNX version to the version of the nuget package file created in the previous step.<MicrosoftMLOnnxRuntimePackageVersion>1.0.0-dev-20200131-1133-b783805f</MicrosoftMLOnnxRuntimePackageVersion> -
Open
[YOUR_MLNET_REPO_ROOT]\Directory.Build.propsand add the new nuget source location to theRestoreSourcessection.<PropertyGroup> <RestoreSources> https://api.nuget.org/v3/index.json; https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json; https://dotnet.myget.org/F/dotnet-core/api/v3/index.json; https://dotnet.myget.org/F/roslyn-analyzers/api/v3/index.json; https://pkgs.dev.azure.com/dnceng/public/_packaging/MachineLearning/nuget/v3/index.json; [YOUR_ONNXRUNTIME_REPO_ROOT]\csharp\src\Microsoft.ML.OnnxRuntime\bin\Debug; </RestoreSources> </PropertyGroup>
-
In a new
cmdwindow, rebuild ML.Net and create new custom nuget packages.cd [YOUR_MLNET_REPO_ROOT] git clean -fxd build -debug build -debug -buildPackages
-
Update the NimbusML
nuget.configfile to include both the ML.Net and onnxruntime package source directories.<packageSources> <add key="nuget.org" value="https://api.nuget.org/v3/index.json" /> <add key="local_mlnet" value="[YOUR_MLNET_REPO_ROOT]\bin\packages" /> <add key="local_onnxruntime" value="[YOUR_ONNXRUNTIME_REPO_ROOT]\csharp\src\Microsoft.ML.OnnxRuntime\bin\Debug" /> <!-- <add key="MlNet_Daily" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" /> --> </packageSources>
-
Remove the local nuget cache and clean the NimbusML source directory.
rmdir %USERPROFILE%\.nuget cd [YOUR_NIMBUSML_REPO_ROOT] git clean -fxd
-
Build NimbusML using the remaining instructions found here.