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
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.
Originally posted by: jaredpar
Do you have a repro for this that we could look at?
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.editorconfigshould be able to give us the relevant information.