Visual Studio GlobalSuppression.cs文件和UTF-16 [英] Visual Studio GlobalSuppression.cs file and UTF-16
问题描述
似乎Visual Studio 2015使用UTF-16编码保存了GlobalSuppression.cs
文件.使用SVN时,这很烦人,因为它认为UTF-16文件是二进制文件.
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.
问题:
-
是否可以使用Visual Studio以UTF-8编码保存
GlobalSuppression.cs
?
或者,有人可以提供一个我可以找到该文件所基于的模板的位置(如果存在)吗?请注意,我在Common7\IDE\ItemTemplates
中找不到模板.
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
.
推荐答案
要将文件的编码更改为UTF-8,请执行以下步骤.我已经在VS 2017中尝试过.
To change the encoding of the file into UTF-8 follow following steps. I have tried in VS 2017.
- 在Visual Studio中打开文件
- 从菜单中选择文件选项,然后选择保存{您的文件名} AS" 选项.
- 选择高级保存选项
- 选择您的编码并保存文件. 在此处输入图片描述
- 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
这篇关于Visual Studio GlobalSuppression.cs文件和UTF-16的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!