Menu

#105 Problem with build - CSC : error CS8785: Generator 'RazorSourceGenerator' failed to generate source.

open
nobody
None
2023-11-28
2023-11-22
Anonymous
No

Originally created by: GrtlinG0

PS C:\Users\adamk\source\repos\eShop\src\WebAppComponents> dotnet build
MSBuild version 17.8.3+195e7f5a3 for .NET
Determining projects to restore...
All projects are up-to-date for restore.
CSC : error CS8785: Generator 'RazorSourceGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'FormatException' with message 'T
he input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.'. [C:\Users\adamk\source\repos\eShop\src\WebAppComp
onents\WebAppComponents.csproj]

Build FAILED.

CSC : error CS8785: Generator 'RazorSourceGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'FormatException' with message 'T
he input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.'. [C:\Users\adamk\source\repos\eShop\src\WebAppComp
onents\WebAppComponents.csproj]

0 Warning(s)
1 Error(s)

Time Elapsed 00:00:01.01

Discussion

  • Anonymous

    Anonymous - 2023-11-27

    Originally posted by: captainsafia

    @GrtlinG0 Thanks for reporting this issue!

    Our CI builds are passing here so I assume that this issue is related to specific edits or configuration on your machine. @dotnet/razor-compiler in case this exception looks familiar or can be handled better.

     
  • Anonymous

    Anonymous - 2023-11-27

    Originally posted by: jaredpar

    Do you have a repro for this that we could look at?

     
  • Anonymous

    Anonymous - 2023-11-28

    Originally posted by: chsienki

    From the exception I would guess this is an editorconfig issue. Certain things are base64 encoded to survive round tripping. I'll bet something there is getting encoded wrong and we're blowing up trying to decode it.

    If we can't get a full repro then the \obj\Debug\net8.0\WebAppComponents.GeneratedMSBuildEditorConfig.editorconfig should be able to give us the relevant information.

     

Log in to post a comment.

Auth0 Logo