Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DLL load error #1222

Open
rangerbottle opened this issue Feb 7, 2024 · 4 comments
Open

DLL load error #1222

rangerbottle opened this issue Feb 7, 2024 · 4 comments

Comments

@rangerbottle
Copy link

I am trying to use latest TorchSharp in my C# project .

Running TorchSharp program as an standalone exe throws no errors and outputs just fine.

However, when referencing the dll with the exact same csproj and project setup returns the error.

The error message are:
System.NotSupportedException: This application or script uses TorchSharp but doesn't contain a reference to libtorch-cpu-win-x64, Version=2.1.0.1

I have copied all the libtorch dlls from nuget folder to the same folder contains TorchSharp.dll and project dll and made sure to compile at x64, and still the reference isn’t being recognized.

I would like to ask your help for this issue.
Thanks in advance

@NiklasGustafsson
Copy link
Contributor

What TorchSharp packages are you using?

@rangerbottle
Copy link
Author

TorchSharp Latest version: 0.101.5
libtorch-cpu-win-x64 Latest version: 2.1.0.1
Pytorch 2.1.0
Python 3.9
Visual Studio 2022

@dustincoding
Copy link

I solved a similar issue for myself (maybe not exactly the same). See if this helps: #1218

@rangerbottle
Copy link
Author

I solved a similar issue for myself (maybe not exactly the same). See if this helps: #1218

Thanks a lot~I will try

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants