Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating Assembly Info writes file with incorrect encoding #13

Open
robv8r opened this issue Aug 14, 2015 · 1 comment
Open

Updating Assembly Info writes file with incorrect encoding #13

robv8r opened this issue Aug 14, 2015 · 1 comment

Comments

@robv8r
Copy link

robv8r commented Aug 14, 2015

When you create a file in Visual Studio, it defaults to UTF-8 with BOM. According to StyleCop Rule SA1412:

Storing files in this encoding ensures that the files are always treated the same way by the compiler, even when compiled on systems with varying default system encodings. In addition, this encoding is the most widely supported encoding for features like visual diffs on GitHub and other tooling. This encoding is also the default encoding used when creating new C# source files within Visual Studio.

The AssemblyInfo Activity incorrectly writes a new AssemblyInfo.cs file using UTF-8 without BOM.

The correct behavior would be to either write a new AssemblyInfo.cs file the same encoding as the original file.

Alternatively, the new AssemblyInfo.cs file could always be written using UTF-8 with BOM.

@ThierryBrun
Copy link

Hello, i downloaded the zip, added the assemblies to my project to edit the templates, but i don't see AssemblyInfo Activity nor do i see TFSVersion. I'm using TFS 2013 and VS 2013. am i loading the wrong dlls? but i don't see any others in the zip?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants