ChilliCream / graphql-platform

Welcome to the home of the Hot Chocolate GraphQL server for .NET, the Strawberry Shake GraphQL client for .NET and Banana Cake Pop the awesome Monaco based GraphQL IDE.
https://chillicream.com
MIT License
5.28k stars 748 forks source link

ChilliCream code generator on .NET 6 C# 10 (console) dont work #5457

Closed bnayae closed 2 years ago

bnayae commented 2 years ago

Is there an existing issue for this?

Describe the bug

Following the Get Started tutorial using .NET 6 & C# 10. Don't generate code. dotnet build don't create the Generated folder.

Steps to reproduce

  1. Follow the tutorial

Relevant log output

No response

Additional Context?

C# 10 .NET 6

Product

Strawberry Shake

Version

latest

bieri commented 2 years ago

Make sure the csproj file has no entries for the .graphql files like so

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
      <TargetFramework>net6.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.1" />
    <PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" />
    <PackageReference Include="StrawberryShake.CodeGeneration.CSharp.Analyzers" Version="12.13.2" />
    <PackageReference Include="StrawberryShake.Transport.Http" Version="12.13.2" />
  </ItemGroup>
</Project>
michaelstaib commented 2 years ago

Check out our new generator in the preview... first watch the video as the package structure changed: https://www.youtube.com/watch?v=utIbv15yn1Y