在 Visual Studio '22 中使用 NUnit 的测试项目中,V.S. build 会生成 13 个文件夹,其中
de、es、fr、it、zh-Hans 等国家的代码
每个文件夹都有相同的 6 个 dll 集合,例如
Microsoft.TestPlatform.CommunicationUtilities.resources.dll
Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll
这些 dll 也位于根文件夹中,有没有办法在构建中避免这些子文件夹?
您可以通过将以下行添加到您正在构建的项目文件的
<PropertyGroup>
元素内来限制生成哪些文件夹:
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
如果您也喜欢法语:
<SatelliteResourceLanguages>en;fr</SatelliteResourceLanguages>