Visual Studio GlobalSuppression.cs file and UTF-16

China☆狼群 提交于 2019-12-14 03:44:03

问题


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.

  1. Open the file in Visual Studio
  2. Select File Option From menu and Select "Save {Your File Name} AS" option.
  3. Select Advance Save Option
  4. Select your Encoding and save the file. enter image description here


来源:https://stackoverflow.com/questions/33614568/visual-studio-globalsuppression-cs-file-and-utf-16

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!