IRONSOFTWAREHOME

ML.OnnxRuntime Build Error

Curtis Chau
Curtis Chau
Updated: August 2, 2026

When using the IronBarcode ZIP package, you might encounter the following error message:

Error (active) MSB3027
Could not copy "C:\Users\first\.nuget\packages\microsoft.ml.onnxruntime\1.18.1\runtimes\ios\native\onnxruntime.xcframework\ios-arm64_x86_64-maccatalyst\onnxruntime.framework\Headers\onnxruntime_session_options_config_keys.h" to "bin\Debug\net8.0\runtimes\ios\native\onnxruntime.xcframework\ios-arm64_x86_64-maccatalyst\onnxruntime.framework\Headers\onnxruntime_session_options_config_keys.h". Exceeded retry count of 10. Failed.
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets
5034        
Text

Reason

This error occurs when Microsoft.ML.OnnxRuntime is not installed immediately after adding the project references from the IronBarcode ZIP file and before building the entire project. It is related to a file copy operation exceeding the maximum retry count, which is a symptom of the assembly not being set up correctly.

Solution

Unfortunately, this issue appears to be a known problem within the Microsoft build system, and there is no immediate fix within the current project setup.

The recommended approach is to create a new project from scratch and reinstall the necessary dependencies in a specific order, which helps ensure that the build system resolves all dependencies correctly and avoids the copy operation error.

Steps to Resolve:

  1. Create a new project: Start with a clean slate by creating a new project in your development environment.
  2. Add project reference to IronBarcode DLLs: Incorporate the IronBarcode libraries by adding the appropriate DLL references in your project settings.
  3. Install Microsoft.ML.OnnxRuntime: Before building, install the Microsoft.ML.OnnxRuntime package. This can typically be done via NuGet package manager or through the command line using dotnet add package Microsoft.ML.OnnxRuntime.
  4. Build the project: Once all dependencies have been correctly set up and installed, build the project. This order of operations helps ensure that the necessary components are available for the build system to work correctly.

By following these steps, you can mitigate the file copying issue and allow the build process to complete successfully.

Curtis Chau
Technical Writer

Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.

...
Read More

Ready to Get Started?

Nuget Downloads 2,422,100Version:2026.9just released

Get your free 30-day Trial Key instantly.
No credit card or account creation required
C# NuGet Library for PDF
Install with NuGet

Version: 2026.9

PM > Install-Package BarCode
nuget.org/packages/BarCode/
  1. In Solution Explorer, right-click References, Manage NuGet Packages
  2. Select Browse and search "IronBarCode"
  3. Select the package and install
C# PDF DLL
Download DLL

Version: 2026.9

  1. Download and unzip IronBarCode to a location such as ~/Libs within your Solution directory
  2. In Visual Studio Solution Explorer, right click References. Select Browse, "IronBarCode.dll"

Licenses from $999

Key in blue circle

Get your free 30-day Trial Key instantly.

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
Book your free Live Demo
Booking Badge

Trusted by Millions of Engineers Worldwide

Iron Software's customer logos
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required