我可以建立一个.NET程序集时指定的模块版本ID(MVID)? [英] Can i specify the module version id (MVID) when building a .net assembly?

查看:525
本文介绍了我可以建立一个.NET程序集时指定的模块版本ID(MVID)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一些共享程序集得到自动构建每一个夜晚。如果没有对源所做的更改,我希望大会的二进制文件是完全一样的previous版本。

We have some shared assemblies that get build automatically every night. When there are no changes made to the sources, i would expect the assembly binaries to be exactly the same as a previous version.

然而,似乎有组件之间的微小差别。

However, there seem to be minor differences between assemblies.

我已经做了一些努力,以确定差异之间的两个版本。我用反汇编来产生IL版本,并比较结果文本版本。 (在伊利诺斯州)的唯一差别是在MVID(随机GUID)模块中。

I have done some effort to determine the difference between two builds. I used ildasm to generate an il version, and compared the resulting text versions. The only difference (in IL) is the MVID (a random guid) in the module.

一些谷歌搜索告诉我,模块版本ID获取由编译器生成的,所以它能够确定生成源,即使当一切是相同的。

Some googling tells me that the module version id gets generated by the compiler, so it is possible to determine the build source, even when everything else is the same.

此MVID制造人工的diff betweeen构建的相同code和所得组件的人工签

This MVID creates an artificial diff betweeen builds of the same code, and an artificial checkin of the resulting assembly.

是否有可能提供MVID到C#编译器?

Is it possible to supply the MVID to the C# compiler?

推荐答案

在ECMA-335标准说:

The ECMA-335 standard says:

该MVID是一个GUID,用来区分   两个版本的同一间   模块

The MVID is a Guid used to distinguish between two versions of the same module

,提供这一种说法,以C#编译器会战胜它的目的,因为你可以通过相同的MVID不同的构建,所以我会说没有。

Based on this description, supplying this is an argument to C# compiler will defeat it's purpose since you can pass the same MVID for different builds so I would say No.

我想更简单的方法是建立只有当事情每天晚上改变不一定。

I think the easier way would be to build only when something changes not necessarily every night.

这篇关于我可以建立一个.NET程序集时指定的模块版本ID(MVID)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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