Visual Studio GlobalSuppression.cs文件和UTF-16 [英] Visual Studio GlobalSuppression.cs file and UTF-16

查看:129
本文介绍了Visual Studio GlobalSuppression.cs文件和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.

  1. 在Visual Studio中打开文件
  2. 从菜单中选择文件选项,然后选择保存{您的文件名} AS" 选项.
  3. 选择高级保存选项
  4. 选择您的编码并保存文件. 在此处输入图片描述
  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

这篇关于Visual Studio GlobalSuppression.cs文件和UTF-16的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆