【发布时间】:2014-11-19 20:32:42
【问题描述】:
用于 c# 的 Azure Storage 2.0 客户端使用 Microsoft.Data.OData 库。 问题是在构建时我在我的构建文件夹中找到:
bin/de/Microsoft.Data.Edm.resources.dll
bin/de/Microsoft.Data.OData.resources.dll
bin/de/Microsoft.Data.Services.Client.resources.dll
bin/de/System.Spatial.resources.dll
bin/es/Microsoft.Data.Edm.resources.dll
bin/es/Microsoft.Data.OData.resources.dll
bin/es/Microsoft.Data.Services.Client.resources.dll
bin/es/System.Spatial.resources.dll
等语言 de、es、fr、it、ja、ko、ru、zh 两次
这使得我发送到 Azure 云实例的包中大约有 3.2 个月的我猜无用库。我希望我的包裹尽可能轻,以便快速发送。
我的应用程序设置为使用 Culture default 和culture FR-FR
排除所有其他语言是否安全?如何在构建时实现此排除?
这是我的网络配置
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.WindowsAzure.Storage" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.6.1.0" newVersion="5.6.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Data.Services.Client" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.6.1.0" newVersion="5.6.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.6.1.0" newVersion="5.6.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
【问题讨论】:
-
您可以随时进行构建后事件并删除它们,但我不知道它们是否需要。另一种选择是直接从源代码管理发布并从源代码管理中排除 nuget 包(将由构建服务器在构建时添加):azure.microsoft.com/en-us/documentation/articles/…
-
这是一个很大的痛苦,浪费了我的发布时间,因为它坚持要我上传韩文、日文等。一方面,我不想在 NuGet 中看到所有这些不同的包,但是另一方面,我当然不希望它们都出现在我的发布资料中。
-
为什么 MS 从一开始就添加这个库?在大多数情况下,这只是在搞乱我的部署。