如何在TargetFramework更改后维护特定于语言的注释

Ank*_*dra 10 .net c# visual-studio-2012

我将为我们的客户项目升级TargetFramework,但他们使用法语进行开发.但是我们在这里使用英语.现在,当我升级目标框架时,资源设计器文件注释从法语变为英语. 框架4.0中的资源设计器文件注释

<summary>
///   Une classe de ressource fortement typée destinée, entre autres, à la consultation des chaînes localisées.
/// </summary>
Run Code Online (Sandbox Code Playgroud)

使用项目属性下拉升级TargetFramework后,将其更改为

/// <summary>
///   A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
Run Code Online (Sandbox Code Playgroud)

你能帮我解决一下我们如何用法语保存Visual Studio自动生成的注释我需要采取哪些步骤来处理这个问题?

是否有可能,如果我在我的机器上安装法语和英语的4.5.2框架.然后当我从下拉列表中选择targetframwork时,我可以指定我需要哪种语言来迁移法语或英语?

这些是自定义资源文件,如EmployeeException.resx文件.现在该文件的内容不会改变.它仍然使用法语,但其设计者文件MEGExceptionMessages.Designer.cs已更改为英文翻译.因为这些是Visual Studio支持的文件所以我认为由于框架更改它会自动转换.

早些时候是

<auto-generated>
//     Ce code a été généré par un outil.
//     Version du runtime :4.0.30319.18444
//
//     Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si
//     le code est régénéré.
// </auto-generated>
Run Code Online (Sandbox Code Playgroud)

在Tar​​get框架改变之后,现在它是......

/ <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.34209
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
Run Code Online (Sandbox Code Playgroud)

Ank*_*dra 1

我从 MSDN 博客上得到了答案。您可以参考以下链接了解更多详情。要解决此问题,需要安装 Visual Studio 语言包,然后从“工具”>>“选项”>>“国际设置”中选择特定的语言设置。

https://social.msdn.microsoft.com/Forums/vstudio/en-US/cd7d0132-3d57-4fd7-ad42-35866c94af62/how-to-maintain-language-specific-comments-after-targetframework-change?forum= NETFXBCL

安库什