Skip to content

Example snippets in README don't compile #55

@paulc-fugro

Description

@paulc-fugro

Checklist

Describe the problem you'd like to have solved

The current README examples don't compile as-is.

For example: https://github.com/openfga/dotnet-sdk?tab=readme-ov-file#client-credentials

The following errors when compiled:

ClientCredentials.cs(13,39): error CS0246: The type or namespace name 'Credentials' could not be found (are you missing a using directive or an assembly reference?) [okta.csproj]
ClientCredentials.cs(14,34): error CS0103: The name 'CredentialsMethod' does not exist in the current context [okta.csproj]
ClientCredentials.cs(15,38): error CS0246: The type or namespace name 'CredentialsConfig' could not be found (are you missing a using directive or an assembly reference?) [okta.csproj]
ClientCredentials.cs(25,22): error CS0246: The type or namespace name 'ApiException' could not be found (are you missing a using directive or an assembly reference?) [okta.csproj]
ClientCredentials.cs(26,18): error CS0103: The name 'Debug' does not exist in the current context [okta.csproj]

Describe the ideal solution

The experienced C# programmer will probably know which using statements to add straight away, or know where to go look. Being new to C# I have no idea which packages these belong to, or what using statements to use.

Alternatives and current workarounds

The example code seem to have everything and compiles, so I might start with that.

https://github.com/openfga/dotnet-sdk/blob/main/example/Example1/Example1.cs

I known it's on the top-level repository, but it might be worth mentioning in the readme.

References

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions