supabase-community / supabase-csharp

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

Does not work with Windows Presentation Foundation (WPF) #116

Closed pinnouse closed 10 months ago

pinnouse commented 1 year ago

Bug report

Describe the bug

Added nuget package to app, does not build.

To Reproduce

  1. Create new .NET Framework project
  2. Install supabase-csharp package
  3. Build

Expected behavior

Builds and runs normally.

Screenshots

image

System information

Additional context

Tried both targeting Framework 4.7.2 and 4.8 as well as a bunch of other workarounds found online such as adding an explicit reference to "netstandard" in the config.

acupofjose commented 1 year ago

@pinnouse I can duplicate it, but I have no idea how to fix it. Everything I see online about the types says it's a VS issue, but that doesn't really make sense to me. With targeting netstandard2.0 I believe it should have support for framework 4.x? But, like I said, I don't know how to fix the build error, it's outside what I've used C# for in the past.

wiverson commented 1 year ago

I think this sort of thing arises from having NuGet pull down conflicting libraries. When you target netstandard2.0 my observation has been that NuGet will pull down a bunch of extra libraries that will generate conflicts with other .NET versions.

For example, here is a trimmed down set of libs that I use for Unity. You might try manually deleting some of the libraries (esp System.* ones) and see if that helps.