使用相同resx文件构建的卫星dll会创建具有较小差异的dll。有什么办法可以避免这个吗 [英] Satellite dlls built with same resx files create dlls with minor diffs. Any way to avoid this?

查看:78
本文介绍了使用相同resx文件构建的卫星dll会创建具有较小差异的dll。有什么办法可以避免这个吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用satellite来本地化文本资源。作为构建管道的一部分,我重建了所有。构建资源dll后,即使resx文件未更改,它们也始终在源代码管理中标记为已修改。检查差异似乎
是每次都改变的相同字节(某种时间戳可能?)。有没有办法避免这种情况,并且在相同的输入下构建产生一致的dll?谢谢!

解决方案

Alex Chouls,


欢迎来到MSDN论坛。


>>>  有没有办法避免这种情况,并且在相同输入的情况下让构建产生一致的dll?


您可以创建"CustomBuild"目标增量。  VS仅在输入发生变化或缺少预期输出时构建它:

< ItemGroup> 
< SatelliteFiles Include =" .. \ * .dll"的DestinationPath = QUOT;

(PROJECTDIR)

(OUTDIR)\%(文件名)%(扩展部分)" />
< / ItemGroup>

< Target Name =" CustomTarget"输入= QUOT; @(SatelliteFiles)"输出= QUOT; @(SatelliteFiles->"%(的DestinationPath)")">
< Exec Command ="& quot;


Hi, I'm using satellite to localize text resources. As part of the build pipeline I rebuild all. When the resource dlls are built they are always marked as modified in source control even though the resx files have not changed. Checking the diff it seems to be the same bytes that are changing each time (some kind of timestamp maybe?). Is there any way to avoid this and have the build produce a consistent dll given the same inputs? Thanks!

解决方案

Hi Alex Chouls,

Welcome to MSDN forum.

>>> Is there any way to avoid this and have the build produce a consistent dll given the same inputs?

You can create a "CustomBuild" target incremental. VS only builds it when the inputs change or the expected outputs are missing:

<ItemGroup>
  <SatelliteFiles Include="..\*.dll" DestinationPath="


(ProjectDir)


(OutDir)\%(Filename)%(Extension)" /> </ItemGroup> <Target Name="CustomTarget" Inputs="@(SatelliteFiles)" Outputs="@(SatelliteFiles->'%(DestinationPath)')"> <Exec Command="&quot;


这篇关于使用相同resx文件构建的卫星dll会创建具有较小差异的dll。有什么办法可以避免这个吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆