虽然我团队的其他成员都在使用 VS2012,但我是团队中第一个切换到 VS2013 的成员。我注意到的第一个主要区别是,对于同一个项目/解决方案,VS2012 正在为我的 RESX 本地化文件生成附属程序集,但 VS2013 不是。所有资源都嵌入到主程序集中。
如何让 VS2013 自动生成附属程序集?
更新:这是构建日志的一个有趣部分:
似乎没有正确检测到文化。在 VS2012 构建日志中,它是。
2>Target "SplitResourcesByCulture" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "..." (target "PrepareResourceNames" depends on it):
2>Task "Warning" skipped, due to false condition; ('@(ResxWithNoCulture)'!='') was evaluated as (''!='').
2>Task "Warning" skipped, due to false condition; ('@(ResxWithCulture)'!='') was evaluated as (''!='').
2>Task "Warning" skipped, due to false condition; ('@(NonResxWithCulture)'!='') was evaluated as (''!='').
2>Task "Warning" skipped, due to false condition; ('@(NonResxWithNoCulture)'!='') was evaluated as (''!='').
2>Task "AssignCulture"
2> Culture of "" was assigned to file "Documentation\Resources\Messages.fr.resx".
2> Culture of "" was assigned to file "Documentation\Resources\Messages.resx".
2> Culture of "" was assigned to file "Modules\Analysis\Resources\Messages.fr.resx".
2> Culture of "" was assigned to file "Modules\Analysis\Resources\Messages.resx".
2> Culture of "" was assigned to file "Infrastructure\Resources\Features.fr.resx".
2> Culture of "" was assigned to file "Infrastructure\Resources\Features.resx".
2> Culture of "" was assigned to file "Modules\Reporting\Resources\Messages.fr.resx".
2> Culture of "" was assigned to file "Modules\Reporting\Resources\Messages.resx".
2> Culture of "" was assigned to file "Controls\Resources\Messages.fr.resx".
2> Culture of "" was assigned to file "Controls\Resources\Messages.resx".
2> Culture of "" was assigned to file "Infrastructure\Resources\Messages.fr.resx".
2> Culture of "" was assigned to file "Infrastructure\Resources\Messages.resx".
2> Culture of "" was assigned to file "Infrastructure\Resources\StructureItemAttributes.fr.resx".
2> Culture of "" was assigned to file "Infrastructure\Resources\StructureItemAttributes.resx".
2> Culture of "" was assigned to file "Modules\Data\Resources\Messages.fr.resx".
2> Culture of "" was assigned to file "Modules\Data\Resources\Messages.resx".
2> Culture of "" was assigned to file "Modules\Home\Resources\Messages.fr.resx".
2> Culture of "" was assigned to file "Modules\Home\Resources\Messages.resx".
2> Culture of "" was assigned to file "Modules\License\Resources\Messages.fr.resx".
2> Culture of "" was assigned to file "Modules\License\Resources\Messages.resx".
2> Culture of "" was assigned to file "Modules\Menu\Resources\Messages.fr.resx".
2> Culture of "" was assigned to file "Modules\Menu\Resources\Messages.resx".
2> Culture of "" was assigned to file "Modules\Options\Resources\Messages.fr.resx".
2> Culture of "" was assigned to file "Modules\Options\Resources\Messages.resx".
2> Culture of "" was assigned to file "Modules\Structure\Resources\Messages.fr.resx".
2> Culture of "" was assigned to file "Modules\Structure\Resources\Messages.resx".
2> Culture of "" was assigned to file "Resources\Messages.fr.resx".
2> Culture of "" was assigned to file "Resources\Messages.resx".
2>Done executing task "AssignCulture".