1

提供如下简单的源 .cs 文件,有没有办法使用 MSBuild(或至少使用 csc.exe)生成相同的 .dll,以便它们的二进制哈希匹配?

foo.cs

public class Foo
{
    public int Bar;
}

foo.bat

del foo*.dll

csc /t:library foo.cs
move foo.dll foo1.dll

csc /t:library foo.cs
move foo.dll foo2.dll

powershell -Command "Get-ChildItem foo*.dll | ForEach-Object { $_.CreationTime = $_.LastWriteTime = $_.LastAccessTime = \"2013-03-15\" }"

示例二进制差异报告位于https://dl.dropbox.com/u/65419748/CscBin.html

有谁知道这些差异是什么以及如何解决它们?

4

0 回答 0