Skip to content

NET问题记录

约 200 字小于 1 分钟

NET

2024-12-19

NuGet 警告 NU1302

NuGet 警告 NU1302

[NU1302] You are running the 'restore' operation with an 'HTTP' source: http://192.168.3.60:8081/repository/nuget-group/index.json. NuGet requires HTTPS sources. To use an HTTP source, you must explicitly set 'allowInsecureConnections' to true in your NuGet

在对应的源中加入 allowInsecureConnections="true"

<add key="Defang Local Package source" value="http://192.168.3.60:8081/repository/nuget-group/index.json" allowInsecureConnections="true"/>

OnnxrRuntime.Gpu使用报错LoadLibrary failed with error 126 "" when trying to load \bin\Debug\onnxruntime_providers_cuda.dll"

LoadLibrary failed with error 126

LoadLibrary failed with error 126 "" when trying to load "C:\Users\yuche\source\repos\WhiteCount\bin\Debug\onnxruntime_providers_cuda.dll"

核心就是依赖的问题,cuda的库太多了,可以使用 Dependencies 工具 查看缺失的依赖 最好是直接把torch包的内容全部拷贝过来 也要注意OnnxRuntime.Gpu的版本,对应的依赖包不一样