How to prevent a .NET application from loading/referencing an assembly from the GAC?

前端 未结 4 1156
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-03 09:35

Can I configure a .NET application in a way (settings in Visual Studio) that it references a \"local\" assembly (not in GAC) instead of an assembly within the GAC, although

4条回答
  •  南方客
    南方客 (楼主)
    2020-12-03 10:16

    If you can change the version number of the local dll, you can use a dll version redirect using the oldVersion attribute. You can use a strong name for the local assembly: Please look this page: http://msdn.microsoft.com/en-us/library/7wd6ex19.aspx

    Also you should consider that it is possible to modify the version number of a compiled assembly like it is described here: Change Assembly Version in a compiled .NET assembly

提交回复
热议问题