botframework-components
botframework-components copied to clipboard
Generated cs need to be stored as UTF-8 with byte order mark
Version
Latest from main as of 3/30/2021
Describe the bug
StyleCop throws a Store files as UTF-8 with byte order mark warning when trying to open the csproj in visual studio.

Affected files (that I've found so far) are:
- BotControoler.cs
- SkillController.cs
- Program.cs
- Startup.cs
To Reproduce
- Create an empty bot
- open the bot in Visual stdudio and add StyleCop to it

- Turn warnings as errors to make it easier to see the violations
- Try to compile the bot and you'll get the errors shown above.
Expected behavior
Generated projects should pass StyleCop (and FxCop if used) checks on compile.
Additional context
My current workaround is to open the affected files in VS and resave them so they have the proper encoding.
It looks like we can achieve this through yeoman with a combination of registerTransformStream() (see Transform output files through streams) and gulp-line-ending-corrector.
CRLF is a very Windows-specific thing; we should determine what the desired behavior across all OS environments ought to be here.
Need to investigate if CRLF has negative impact on other OS (Max/Linux) environments.
Moving to backlog for R14 consideration.