如何强制 Visual Studio 2008 使用正确的区域设置保存 vcproj 文件?
在我的团队中,一些人正在使用瑞典语语言环境(尽管使用英语)进行开发,而其他人则使用美国英语。我更喜欢瑞典语格式的日期/时间/数字/货币。
vcproj 文件中版本字段的格式存在一个错误,这意味着它会不断地从逗号更改为点,然后再更改回来,具体取决于最后编辑该文件的人。
差异如下所示:
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="9.00"
+ Version="9,00"
Name="TehProject"
ProjectGUID="{BDFA4CC2-70CA-4B98-AC31-FC233434B56A3}"
有什么想法如何解决这个问题吗?虽然很小,但它开始让我心烦意乱。 :)
In my team, some are developing using Swedish locale (albeit with English language) and others are using US-English. I prefer Swedish formatting of date/time/number/currency.
There's a bug in the formatting of the version field in the vcproj file which means that it's constantly being changed from comma to dot and back again, depending on who edited the file last.
The diffs look like this:
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="9.00"
+ Version="9,00"
Name="TehProject"
ProjectGUID="{BDFA4CC2-70CA-4B98-AC31-FC233434B56A3}"
Any ideas how to resolve this? It's pretty minor, but it starting to get on my nerves. :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我遇到同样的问题。经过调查,我认为在 Windows 中没有标准方法来设置特定于应用程序的区域设置。它只能在系统范围内更改。
Windows 标准工具可以完成的唯一解决方案是使用
runas
命令并在具有英语语言环境(或某些语言环境)的不同用户帐户下运行 VS IDE (devenv.exe
)小数点分隔符是点)。这是一个丑陋的解决方案,有几个缺点(例如,您应该手动输入密码或使用不安全的/savecred
参数,对主用户帐户配置文件的更改应手动复制到“IDE”帐户,也许还有其他我已经错过了)。我认为它不值得它的价格。I'm experiencing same problem. After investigation it looks to me that in Windows there is no standard way to set locale application-specific. It can be changed system-wide only.
The only solution that can be done by Windows standard tools is to use
runas
command and run VS IDE (devenv.exe
) under different user account with English locale (or some locale which decimal separator is point). This is ugly solution that suffers from several disadvantages (e.g. you shall enter password manually or use unsecure/savecred
param, changes to main user account profile shall be manually replicated to 'IDE' account, maybe something else that I've missed). By my opinion it doesn't worth its price.我发现 AppLocal 实用程序应该允许运行特定区域设置: http: //www.microsoft.com/en-us/download/details.aspx?id=13209
有一天会测试。
I found the AppLocal utility which should allow running a specific locale: http://www.microsoft.com/en-us/download/details.aspx?id=13209
Will test someday.