Initial setup instructions improvement
See original GitHub issueThe wiki states for the the initial setup to add a target in the project file so it’s rebuild every time before compile:
<Target Name="GenerateQLClient" BeforeTargets="BeforeCompile">
<Exec Command="dotnet zeroql generate --schema .\schema.graphql --namespace TestServer.Client --client-name TestServerGraphQLClient --output Generated/GraphQL.g.cs" />
</Target>
As the generated client is not declared as output it can lead to build issues when the generated file is not existing already. This can be improved by declaring the output of the exec task and adding an item group:
<Target Name="GenerateQLClient" BeforeTargets="BeforeCompile">
<Exec Command="dotnet zeroql generate --schema .\schema.graphql --namespace TestServer.Client --client-name TestServerGraphQLClient --output Generated/GraphQL.g.cs" Outputs="Generated/GraphQL.g.cs">
<Output ItemName="Generated" TaskParameter="Outputs" />
</Exec>
<ItemGroup>
<Compile Include="@(Generated)" />
<FileWrites Include="@(Generated)" /> <!-- For clean to work properly -->
</ItemGroup>
</Target>
Now the generated file doesn’t need to exist when building and also doesn’t have to be committed.
Issue Analytics
- State:
- Created 3 months ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
How to Establish a Performance Improvement Plan
Learn how to create a performance improvement plan (PIP). Disciplinary procedure steps and sample action plans are included.
Read more >How to improve work instruction effectiveness part 1 - YouTube
If you're interested in my 6-step problem solving template, it's available for free through this link: ...
Read more >How to improve your 'First Time Right' score in 5 steps
In the example of FTR, the manufacturer would: 1. Define the problem with the process. For example, Plant A's low FTR score indicates...
Read more >How to write a work instruction - simple step-by-step guide
Just start and learn and improve as you go. One idea is to inform your colleagues what you're doing and ask them to...
Read more >How to Build the Best User Manual
We'll look at what a user manual is, explore the various types you can create, and lay out exactly how to write user...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The generated client would be stored inside
./obj/ZeroQL
folder. So it will never appear in the solution. However, you still have access to generated classes.Checkout version 6.0.0-preview.1. I added additional targets to the Nuget package. Now it automatically looks for the ZeroQL config file and executes CLI on the build. Here the full documentation