c# – 程序集引用之间的差异

栏目: ASP.NET · 发布时间: 5年前

内容简介:翻译自:https://stackoverflow.com/questions/13703868/differences-between-assembly-references

在一些机器上添加csproj中的程序集引用后生成下一个标记.

<Reference Include="Microsoft.Expression.Interactions">
  <HintPath>..\Libs.SL\Blend\Microsoft.Expression.Interactions.dll</HintPath>
</Reference>

但是在一些机器上生成了带有版本,文化,令牌和处理器架构的参考:

<Reference Include="Microsoft.Expression.Interactions, Version=5.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
  <SpecificVersion>False</SpecificVersion>
  <HintPath>..\Libs.SL\Blend\Microsoft.Expression.Interactions.dll</HintPath>
</Reference>

为什么是这样?

从msdn中提取:

Processor architecture is added to the assembly identity in the .NET

Framework version 2.0, to allow processor-specific versions of

assemblies. You can create versions of an assembly whose identity

differs only by processor architecture, for example 32-bit and 64-bit

processor-specific versions. Processor architecture is not required

for strong names. For more information, see

AssemblyNameProcessorArchitecture. In this example,

the fully

qualified name indicates that the myTypes assembly has a strong name

with a public key token, has the culture value for US English, and has

a version number of 1.0.1234.0. Its processor architecture is “msil”,

which means that it will be just-in-time (JIT)-compiled to 32-bit code

or 64-bit code depending on the operating system and processor.

Code that requests types in an assembly must use a fully qualified
assembly name. This is called fully qualified binding. Partial
binding, which specifies only an assembly name, is not permitted when
referencing assemblies in the .NET Framework.

All assembly references to assemblies that make up the .NET Framework

also must contain a fully qualified name of the assembly. For example,

to reference the System.Data .NET Framework assembly for version 1.0

would include:

在源代码中查看更多:

http://msdn.microsoft.com/en-us/library/k8xx4k69.aspx

翻译自:https://stackoverflow.com/questions/13703868/differences-between-assembly-references


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

从需求到产品:0岁产品经理进阶之道

从需求到产品:0岁产品经理进阶之道

权莉 / 人民邮电出版社 / 2018-7 / 49.80元

本书主要针对刚入职的初级产品经理,从贴近工作状态的场景切入,对各阶段的知识点进行分类总结,旨在提供一套经过实践检验的产品方法论,为读者从初级产品经理成长为产品经理奠定坚实的基础。 书中提炼的方法和案例涵盖初级产品经理工作的方方面面,从基本技能到思维方式,从需求管理到产品规划定义,从框架选型到流程梳理,从工作模块拆解到案例剖析,用具体且贴合实际工作场景的内容,还原真实的产品工作方法及实践案例,既有方......一起来看看 《从需求到产品:0岁产品经理进阶之道》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

html转js在线工具
html转js在线工具

html转js在线工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换