Skip to content

Template is using method that is not found #374

@AndresH18

Description

@AndresH18

Describe the bug

The DataSyncServer Template is using a missing extension method to register the components in Program.cs.

To Reproduce

  1. Install the 'CommunityToolkit.Datasync.Server.Template.CSharp' template.
  2. Create a new project using the template datasync-server.
  3. Build the project.
  4. Build fails with error CS1061 'IServiceCollection' does not contain a definition for 'AddDatasyncControllers' and no accessible extension method 'AddDatasyncControllers' accepting a first argument of type 'IServiceCollection' could be found (are you missing a using directive or an assembly reference?) in Program.cs

Expected behavior

The build is successful.

What platforms?

Note: Any bug or feature request that is opened for an unsupported environment will be automatically closed.

  • Server:
    • Version of dotnet being used to compile: 9.0.301
    • Library versions: 9.0.3
    • Where are you running the server: Windows

Additional context

Add any other context about the problem here.
Extension method AddDatasyncControllers is not found. Documentation and source are showing that the method to be called should be AddDatasyncServices.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Requires TriageThis issue has not been checked by the project team.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions