question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

StrawberryShake.Blazor causes thousands of build errors

See original GitHub issue

Is there an existing issue for this?

  • I have searched the existing issues

Product

Strawberry Shake

Describe the bug

Just creating a simple Blazor WASM project in .NET 7 and adding StrawberryShake.Blazor causes a bunch of errors when I try to build it. The first thing that happens is that I get a warning, and if I ctrl+c the console, I’m able to copy that warning. It seems to indicate that the build is enumerating my ENTIRE DRIVE, which is crazy:

MSBUILD : warning MSB5029: The value "\**\*.cs" of the "Include" attribute in element <ItemGroup> in file "C:\Users\evshe\.nuget\packages\strawberryshake.blazor\13.1.0\build\Straw
berryShake.Blazor.targets (23,16)" is a wildcard that results in enumerating all files on the drive, which was likely not intended. Check that referenced properties are always def 
ined. [C:\Users\evshe\source\repos\TestBlazorGraphQL\TestBlazorGraphQL.csproj]

Also, when I added it originally in VS2022, it started downloading tons of files from OneDrive into a Unity folder which was in a completely separate place than this project. It froze up VS and I had to completely redo a lot of things. My guess is that this drive enumeration is causing it to try to download ALL my OneDrive files, which is not acceptable. The only way I was able to safely reproduce the issue was in VS Code with CLI commands.

Expected: Do not enumerate all files in my drive

Steps to reproduce

  1. Create a new Blazor WASM project and add StrawberryShake.Blazor, then build it:
dotnet new blazorwasm -o TestBlazorGraphQL
cd TestBlazorGraphQL
dotnet add package StrawberryShake.Blazor
dotnet build

Relevant log output

Warning (if Ctrl+c):

MSBUILD : warning MSB5029: The value "\**\*.cs" of the "Include" attribute in element <ItemGroup> in file "C:\Users\evshe\.nuget\packages\strawberryshake.blazor\13.1.0\build\StrawberryShake.Blazor.targets (23,16)" is a wildcard that results in enumerating all files on the drive, which was likely not intended. Check that referenced properties are always defined. [C:\Users\evshe\source\repos\TestBlazorGraphQL\TestBlazorGraphQL.csproj]

End of error output if I let it go:

C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\ItemTemplates\Web\CSharp\1033\DynamicDataWebSiteField.cs\DynamicData\FieldTemplates\CodeBeside_Edit.cs(37,1): error CS1022: Type or namespace definition, or end-of-file expected [C:\Users\evshe\source\repos\TestBlazorGraphQL\TestBlazorGraphQL.csproj]
    5 Warning(s)
    15077 Error(s)

Additional Context?

No response

Version

13.1.0

Issue Analytics

  • State:closed
  • Created 4 months ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
michaelstaibcommented, Jun 1, 2023

@holotrek thanks for the analysis, this saved me a lot of time in creating a fix which should be available with the next 13.2 preview.

1reaction
orlandommbcommented, May 28, 2023

i’ve removed everything graphql related from my client side, and followed the tutorial again, also we gotta update the Strawberry.Shake Tools, im still debuggin my project, i’ll get back to report any findings !

Read more comments on GitHub >

github_iconTop Results From Across the Web

C# .Net build failure due to strawberryshake error - Method ...
I have a .net 6 project which uses strawberryshake 12.18.0 grahpql client. It build in my local environment. But when it runs in...
Read more >
Disposed Error StrawberryShake.ObserverSession #6171
Quick update, I just tried upgrading to that version and get this error on build. \.nuget\packages\strawberryshake.blazor\13.1.0-rc.2\build\ ...
Read more >
StrawberryShape required NEtSDK6 or 7 to work error
Dear Community! I am very confused since in my project i explicitely target net7 this implies that i am already using -NET SDK...
Read more >
Incorrectly reported errors when using Strawberry Shake library
When using the Strawberry Shake GraphQL library from ChilliCream, Rider will mark auto-generated types with red squiggly lines because it finds them in...
Read more >
Integrating GraphQL in a Blazor application
To do this, we must create a new GraphqlService class containing a GraphQL client, and a method to execute a GraphQL query that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found