Build failure: unable to download model_quantized.onnx from Hugging Face
Repository: dotnet-smartcomponents/smartcomponents
Environment
- OS: Windows
- Project: samples/ExampleBlazorApp
- Package: SmartComponents.LocalEmbeddings 0.1.0-preview10145
Observed behavior
When running dotnet build the build fails while attempting to download a model from Hugging Face. The error indicates the SSL connection could not be established and the transport connection was closed by the remote host.
Error (excerpt)
Restore complete (0.5s)
ExampleBlazorApp net8.0 failed with 1 error(s) (0.2s)
C:\Users\MPhil\.nuget\packages\smartcomponents.localembeddings\0.1.0-preview10145\build\SmartComponents.LocalEmbeddings.targets(39,9): error MSB3923: Failed to download file "https://huggingface.co/SmartComponents/bge-micro-v2/resolve/72908b7/onnx/model_quantized.onnx". The SSL connection could not be established, see inner exception. ---> Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.. ---> An existing connection was forcibly closed by the remote host.
Build failed with 1 error(s) in 0.9s
Steps to reproduce
- Clone the repository.
- Open
samples/ExampleBlazorApp.
- Run
dotnet build.
- Observe the error shown above during restore/build.
Hypothesis
The file onnx/model_quantized.onnx at the URL above may have been moved, removed, or the Hugging Face path changed. As a result the build-target that attempts to download the file fails with an SSL/connection error.
Suggested next steps / possible fixes
- Verify whether the model exists at the Hugging Face URL and update the URL in the NuGet package/targets if it changed.
- Consider bundling a tested model asset with the package or providing a more reliable host or retry/backoff logic in
SmartComponents.LocalEmbeddings.targets.
- If the model was intentionally removed, update package documentation and targets to reflect the new location or provide guidance for users to obtain the model manually.
Additional context
- Reported by user when building locally on Windows (exact output included above).
Build failure: unable to download model_quantized.onnx from Hugging Face
Repository: dotnet-smartcomponents/smartcomponents
Environment
Observed behavior
When running
dotnet buildthe build fails while attempting to download a model from Hugging Face. The error indicates the SSL connection could not be established and the transport connection was closed by the remote host.Error (excerpt)
Steps to reproduce
samples/ExampleBlazorApp.dotnet build.Hypothesis
The file
onnx/model_quantized.onnxat the URL above may have been moved, removed, or the Hugging Face path changed. As a result the build-target that attempts to download the file fails with an SSL/connection error.Suggested next steps / possible fixes
SmartComponents.LocalEmbeddings.targets.Additional context