Rules for C# class backward compatibility/avoiding breaking changes

后端 未结 3 1518
误落风尘
误落风尘 2021-02-02 10:34

I\'m working on a C# 3.5 assembly that is consumed by many different applications in an enterprise server environment. I would like to add some properties to an existing C# clas

3条回答
  •  灰色年华
    2021-02-02 10:54

    You have to maintain the same assembly version (i.e. don't increment it across builds) — see the AssemblyVersionAttribute in MSDN.

    Also, you could leverage assembly binding redirects, but that involves config file changes which I don't expect to be desirable in your case.

提交回复
热议问题