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

Received an error after upgrading from v0.2.12 to v0.3.0 #19

Closed mkdotcs closed 2 years ago

mkdotcs commented 2 years ago

Error message: System.MissingMethodException: 'Method not found: 'Void Postgrest.Attributes.ColumnAttribute..ctor(System.String)'.'

Table class:

[Table("users")]
public class User : SupabaseModel
{
    [PrimaryKey("id")]
    public long Id { get; set; }

    [Column("user_name")]
    public string UserName { get; set; }
}

The line causing the error: var users = await instance.From<User>().Get();

Am I missing something?

acupofjose commented 2 years ago

hm. That's a new one - could you do a full clean, remove the supabase-csharp package, and reinstall it and see if that fixes it? If not, try adding a nuget reference to postgrest-csharp@2.0.6. It looks like it's not detecting the package.

mkdotcs commented 2 years ago

Full clean up did the trick, I guess it was using an older version. It is fixed now, thanks.