问题
It seems that Visual Studio 2015 saves the GlobalSuppression.cs
file using a UTF-16 encoding. This is annoying when using SVN as it perceives that a UTF-16 file is a binary file.
Questions:
Using Visual Studio, is it possible to save
GlobalSuppression.cs
with a UTF-8 encoding?Alternatively, can someone provide a location where I can find the template that this file is based on (if one exists)? Note that I can't find a template in
Common7\IDE\ItemTemplates
.
回答1:
To change the encoding of the file into UTF-8 follow following steps. I have tried in VS 2017.
- Open the file in Visual Studio
- Select File Option From menu and Select "Save {Your File Name} AS" option.
- Select Advance Save Option
- Select your Encoding and save the file. enter image description here
来源:https://stackoverflow.com/questions/33614568/visual-studio-globalsuppression-cs-file-and-utf-16