[Source Generator] Unable to disable multiple source generators using GodotDisabledSourceGenerators
property
#91999
Labels
GodotDisabledSourceGenerators
property
#91999
Tested versions
Godot
Based on looking at the github, all versions have this bug
Visual Studio
System information
Windows 10 - x64 - vs17.9.7
Issue description
For some reason C# source generators attempting to access global config properties that have a value with a
;
in them result in said value getting truncated.For example:
When the source generators run, they only see the value
GodotPluginsInitializer
for theGodotDisabledSourceGenerators
property even though the generatedGeneratedMSBuildEditorConfig.editorconfig
hasbuild_property.GodotDisabledSourceGenerators
set toGodotPluginsInitializer;ScriptPathAttribute
I wrote my own Source Generator to verify.
This is what's inside the
GeneratorExecutionContext
:But note this is the generated
GeneratedMSBuildEditorConfig.editorconfig
that is created inside theobj
folder:The values of
GodotDisabledSourceGenerators
in the source generator conflict with the values inside the editor config.To fix this issue, the separator can be changed from a
;
to a,
.Steps to reproduce
csproj
file of a C# Godot Project to include the following line in between a<PropertyGroup>
tag in Visual Studio 2022:GodotPlugins.Game
was not generatedDummyClass
ScriptPathAttribute
on it, even though theScriptPathAttribute
source generator was meant to be disabled.Minimal reproduction project (MRP)
N/A
The text was updated successfully, but these errors were encountered: