onnxruntime: Build error: Payload contains two or more files with the same destination path
Description I would like to try to use the new Microsoft.AI.MachineLearning NuGet (1.6.0) but I am experiencing the following build error when I add the NuGet to my UWP project. I don’t have this problem with the previous version (1.5.2).
Build configuration: Debug | x64
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VisualStudio\v16.0\AppxPackage\Microsoft.AppXPackage.Targets(6140,5): error APPX1111: Payload contains two or more files with the same destination path 'Microsoft.AI.MachineLearning.dll', but they are different sizes. Source files:
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VisualStudio\v16.0\AppxPackage\Microsoft.AppXPackage.Targets(6140,5): error APPX1111: C:\Users\hig\.nuget\packages\microsoft.ai.machinelearning\1.6.0\build\uap\..\..\runtimes\win-x64\uap\Microsoft.AI.MachineLearning.dll
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VisualStudio\v16.0\AppxPackage\Microsoft.AppXPackage.Targets(6140,5): error APPX1111: C:\Users\hig\.nuget\packages\microsoft.ai.machinelearning\1.6.0\runtimes\win-x64\native\static\microsoft.ai.machinelearning.dll
The target of my app is Build 19041 and the min version is Build 18362 and I am using the latest Visual Studio 16.8.3.
Urgency I would like to test the new version in order to close #5389.
System information
- OS Platform and Distribution: Windows 10 x64 (20H2) (Build 19042)
- ONNX Runtime installed from (source or binary): NuGet
- ONNX Runtime version: 1.6.0
- Visual Studio version: 16.8.3
To Reproduce
- Create a UWP project that targets Build 19041
- Add Microsoft.AI.MachineLearning NuGet (1.6.0)
- Build for Debug | x64
Expected behavior The build runs without errors.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 21 (7 by maintainers)
Unfortunately, this fix did not make it into the 1.7.0 release.
It has been fixed in master. The fix should become available in the next release.
@juwens, @SuavePirate , @Walia8416, @tom-huntington - From what I can gather, there is an issue with adding the Microsoft.AI.MachineLearning NuGet Package across various versions (1.10, 1.11, 1.12).
However, I am unable to repro this problem in VS2022 with the latest Microsoft.AI.MachineLearning NuGet package (1.15.1). I have tried the following project templates:
Can you please share your configuration that is currently causing problems?
@tom-huntington, Regarding the C# Blank App, Packaged (WinUI 3 in Desktop), I have created the following PR ( https://github.com/microsoft/onnxruntime/pull/16415) to address the issue. If you would like to verify that this works with your applications feel free to checkout the branch in the PR and run a local build.
These parameters will be needed to produce a local package to verify. –enable_wcos –ms_experimental –use_dml –use_winml –build –build_nuget
I see it now. Happens on build. I’ll take a look.