snowflakedb / snowflake-connector-net

Snowflake Connector for .NET
Apache License 2.0
177 stars 135 forks source link

SNOW-1265394: Unable to resolve dependency 'Mono.Unix'. Source(s) used: 'nuget.org', 'Axiom', 'Microsoft Visual Studio Offline Packages'. #895

Closed greenmodulus closed 6 months ago

greenmodulus commented 6 months ago

Please answer these questions before submitting your issue. In order to accurately debug the issue this information is required. Thanks!

  1. What version of .NET driver are you using?

  2. What operating system and processor architecture are you using? Windows 11 x64

  3. What version of .NET framework are you using? .net framework 4.7.2

  4. What did you do?

Opened nuget package manager. Searched for Snowflake.data. Clicked install. Got the above error.

  1. What did you expect to see?

Snowflake.data should have installed.

  1. Can you set logging to DEBUG and collect the logs?

  2. What is your Snowflake account identifier, if any? (Optional)

sfc-gh-dszmolka commented 6 months ago

hi and thank you for raising this Issue with us! Apparently Mono.Unix (which has been added as a dependency with Snowflake .NET driver 3.0.0) is considered prerelease so by default does not get installed.

You can try the following:

  1. Enable installing prerelease packages too in NuGet, per this Microsoft article OR
  2. in your project, open NuGet package manager console (in VisualStudio it's Tools > Nuget Package Manager > Package Manager console), then after Powershell is loaded, issue this command to install Mono.Unix: PM> NuGet\Install-Package Mono.Unix -Version 7.1.0-final.1.21458.1 afterwards, retry installing Snowflake.Data (v3.0.0) which now should be successful OR
  3. if for some reason you don't want to use either of the above approaches, install the older Snowflake.Data v2.2.0 which does not yet depend on Mono.Unix

Hope this helps but let us know if you need any further help.

greenmodulus commented 6 months ago

Thank you so much for your time, knowledge and quick response!!! Checking prerelease didn't change the error but directly installing the Mono.Unix worked and then installing Snowflake.Data worked perfectly!