简体   繁体   English

我可以从装配体信息中找到关于构建的哪些信息?

[英]What information can I find about a build from the assembly info?

Following on from my previous question , what useful information can you retrieve from a .net assembly about the build process? 在上一个问题之后 ,您可以从.net程序集中检索有关构建过程的哪些有用信息? I know I can look at the AssemblyVersion to get major and minor application version, and when the build took place. 我知道我可以查看AssemblyVersion以获取主要和次要应用程序版本以及生成的时间。

Can I find: 我可以找到:

  • Who did the build? 谁做的? ie user name. 即用户名。
  • On what machine? 在什么机器上?
  • Which O/S version? 哪个O / S版本?
  • Anything else useful? 还有其他有用的吗?

From my (limited) investigations (into assemblies I've built) you're basically limited to what the author put into the file. 从我(有限的)调查(到我构建的程序集)中,您基本上只限于作者在文件中输入的内容。

About the only thing that's automatically assigned are the "Internal Name", "Original File name" and "Language". 关于唯一自动分配的内容是“内部名称”,“原始文件名”和“语言”。

There might be some IDE's that put in the information you require, but by default Visual Studio isn't one of them. 可能会有一些IDE放入您所需的信息,但是默认情况下,Visual Studio并不是其中之一。

By default, you don't have any of that information. 默认情况下,您没有任何信息。 Jon's answer to your previous question is actually the correct way to do this. 乔恩对上一个问题的回答实际上是正确的方法。 You want to create custom attributes for each piece of information you want (or one attribute with properties for each) that apply to an assembly. 您想要为要应用于装配的每条信息(或每个属性都有一个属性)创建自定义属性。 This is how the attributes typically found in your AssemblyInfo file work. 这就是通常在AssemblyInfo文件中找到的属性的工作方式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM