supabase-community / supabase-csharp

A C# Client library for Supabase
https://github.com/supabase-community/supabase-csharp/wiki
MIT License
501 stars 51 forks source link

Wont work in Winform? #106

Closed cyrsis closed 10 months ago

cyrsis commented 1 year ago

Bug report

Installed the package from nuget, break every system.draw in winform

Describe the bug

For most of the business application, Winform is essential

A clear and concise description of what the bug is.

To Reproduce

Create a new project with winform (.net) lastest is 4.6

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Go to '…'
  2. Click on '…'
  3. Scroll down to '…'
  4. See error

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

System information

Windows

Additional context

Add any other context about the problem here.

wiverson commented 1 year ago

Try trimming down the libraries to match the same set as in this template - https://github.com/wiverson/supabase-unity-template, specifically down to this set. Sometimes NuGet pulls in too many libraries that appear to conflict...

RishanR commented 11 months ago

I'm also having the System.Drawing issue after installing supabase-csharp for WinForm. Was anyone able to fix this?

RishanR commented 11 months ago

The specific error I'm having is the following: Could not resolve type, 'System.Drawing.GraphicsUnit, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=...

I created this as a Windows Form .NET app btw.

RishanR commented 11 months ago

Nevermind, I got it working. Turns out that you have to create a WPF application, not a WinForm. Works perfectly after that :)