dotnet / TorchSharp

A .NET library that provides access to the library that powers PyTorch.
MIT License
1.38k stars 179 forks source link

Cannot get package with nuget #490

Closed ValerioB88 closed 2 years ago

ValerioB88 commented 2 years ago

Hi, I am trying to install the package in a Unity Project. I am a bit of a noob regarding .NET frameworks so I am at lost here.

When I Install-Package TorchSharp -Version 0.95.4 I get

Could not install package 'TorchSharp 0.95.2'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.7.1', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.              

Other packages in nuget works (get installed without problem) so the issue seems to lie with the TorchSharp package. Any idea?

dsyme commented 2 years ago

TorchSharp is for .NET 5 and above. It won't work with .NET Framework.

Thanks

GeorgeS2019 commented 2 years ago

@ValerioB88 I using Godot 3D engine which will support .NET6 soon. Right now, export pytorch to ONNX and use ML.NET, which is feasible in both Godot and Unity3D

Yukinyaa commented 1 year ago

Unity engine will support .NET5 and up. Preview for now.

see: https://forum.unity.com/threads/net-standard-2-1.757007/