You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
** Description **
A new project created using the HotChocolate.Templates.Server does not build
To Reproduce
mkdir HotChocolateTemplateIssue
cd .\HotChocolateTemplateIssue\
dotnet new graphql -n HotChocolateTemplateIssue
cd .\HotChocolateTemplateIssue\
dotnet build
Produces
Microsoft (R) Build Engine version 16.4.0+e901037fe for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
Restore completed in 477.31 ms for D:\Source\Scratch\HotChocolateTemplateIssue\HotChocolateTemplateIssue\HotChocolateTemplateIssue.csproj.
Startup.cs(22,22): error CS1061: 'IServiceCollection' does not contain a definition for 'AddDataLoaderRegistry' and no accessible extension method 'AddDataLoaderRegistry' accepting a first argument of type 'IServiceCollection' could be found (are you missing a using directive or an assembly reference?) [D:\Source\Scratch\HotChocolateTemplateIssue\HotChocolateTemplateIssue\HotChocolateTemplateIssue.csproj]
Startup.cs(25,33): error CS0103: The name 'SchemaBuilder' does not exist in the current context [D:\Source\Scratch\HotChocolateTemplateIssue\HotChocolateTemplateIssue\HotChocolateTemplateIssue.csproj]
Startup.cs(25,22): error CS1061: 'IServiceCollection' does not contain a definition for 'AddGraphQL' and no accessible extension method 'AddGraphQL' accepting a first argument of type 'IServiceCollection' could be found (are you missing a using directive or an assembly reference?) [D:\Source\Scratch\HotChocolateTemplateIssue\HotChocolateTemplateIssue\HotChocolateTemplateIssue.csproj]
Build FAILED.
Startup.cs(22,22): error CS1061: 'IServiceCollection' does not contain a definition for 'AddDataLoaderRegistry' and no accessible extension method 'AddDataLoaderRegistry' accepting a first argument of type 'IServiceCollection' could be found (are you missing a using directive or an assembly reference?) [D:\Source\Scratch\HotChocolateTemplateIssue\HotChocolateTemplateIssue\HotChocolateTemplateIssue.csproj]
Startup.cs(25,33): error CS0103: The name 'SchemaBuilder' does not exist in the current context [D:\Source\Scratch\HotChocolateTemplateIssue\HotChocolateTemplateIssue\HotChocolateTemplateIssue.csproj]
Startup.cs(25,22): error CS1061: 'IServiceCollection' does not contain a definition for 'AddGraphQL' and no accessible extension method 'AddGraphQL' accepting a first argument of type 'IServiceCollection' could be found (are you missing a using directive or an assembly reference?) [D:\Source\Scratch\HotChocolateTemplateIssue\HotChocolateTemplateIssue\HotChocolateTemplateIssue.csproj]
0 Warning(s)
3 Error(s)
Expected behavior
The build should be successful
Desktop (please complete the following information):
OS: Windows
Version 10 Pro
Additional context
The Startup.cs file is missing a using for HotChocolate. Inserting the following line at line 4 resolves the issue:
using HotChocolate;
The text was updated successfully, but these errors were encountered:
** Description **
A new project created using the HotChocolate.Templates.Server does not build
To Reproduce
mkdir HotChocolateTemplateIssue cd .\HotChocolateTemplateIssue\ dotnet new graphql -n HotChocolateTemplateIssue cd .\HotChocolateTemplateIssue\ dotnet build
Produces
Expected behavior
The build should be successful
Desktop (please complete the following information):
Additional context
The
Startup.cs
file is missing a using forHotChocolate
. Inserting the following line at line 4 resolves the issue:The text was updated successfully, but these errors were encountered: