Version Used:
3.10.0-3.21206.28
Steps to Reproduce:
- Create a new mvc project using
dotnet new mvc -o TestFileNames.
rename Views/Home/Index.cshtml Views/Home/{Index}.cshtml
rename Views/Shared/Error.cshtml Views/Shared/#Error.cshtml
dotnet build
Expected Behavior:
Compilations resolves correctly and we can resolve CompilerVisibleProperties correctly.
Actual Behavior:
The correct properties aren't resolved when using AnalyzerConfigOptions in the generator and you get the following compiler warnings.
CSC : warning InvalidGlobalSectionName: Global analyzer config section name '/Users/captainsafia/Verifications/TestFilesNames/Views/Home/{Index}.cshtml' is invalid as it is not an absolute path. Section will be ignored. Section was declared in file: '/Users/captainsafia/Verifications/TestFilesNames/obj/Debug/net6.0/TestFilesNames.GeneratedMSBuildEditorConfig.editorconfig' [/Users/captainsafia/Verifications/TestFilesNames/TestFilesNames.csproj]
CSC : warning RSG002: TargetPath not specified for additional file: /Users/captainsafia/Verifications/TestFilesNames/Views/Home/{Index}.cshtml. [/Users/captainsafia/Verifications/TestFilesNames/TestFilesNames.csproj]
CSC : warning RSG002: TargetPath not specified for additional file: /Users/captainsafia/Verifications/TestFilesNames/Views/Shared/#Error.cshtml. [/Users/captainsafia/Verifications/TestFilesNames/TestFilesNames.csproj]
The issue around the "#" in the filename is likely related to the issues around parsing characters that are considered comments in the editor config.
The issue with the "{" and "}" characters seems strange though. I haven't been able to find anything related to it in the issues.
Is there a workaround that can be employed in the meantime?
Version Used:
3.10.0-3.21206.28
Steps to Reproduce:
dotnet new mvc -o TestFileNames.rename Views/Home/Index.cshtml Views/Home/{Index}.cshtmlrename Views/Shared/Error.cshtml Views/Shared/#Error.cshtmldotnet buildExpected Behavior:
Compilations resolves correctly and we can resolve
CompilerVisiblePropertiescorrectly.Actual Behavior:
The correct properties aren't resolved when using
AnalyzerConfigOptionsin the generator and you get the following compiler warnings.The issue around the "#" in the filename is likely related to the issues around parsing characters that are considered comments in the editor config.
The issue with the "{" and "}" characters seems strange though. I haven't been able to find anything related to it in the issues.
Is there a workaround that can be employed in the meantime?