Can you mix .NET framework Versions in a solution?

后端 未结 7 1180
遇见更好的自我
遇见更好的自我 2021-02-06 21:17

Our codebase where I work is .NET 2.0. For our new assembly/DLLs/web applications I would love to take advantage of what 3.5 has to offer.

Can one mix .NET frameworks(pe

7条回答
  •  心在旅途
    2021-02-06 21:52

    You cannot have .Net 1.1 assmeblies running in the same process as a .Net 2.0+ assembly - attempting to do so will produce a failure.

    With regards to IIS, this means that you cannot have .Net 1.1 sites / virtual directories running in the same application pool as .Net 2.0 and above sites - you need to create a separate app pool to keep the .Net 1.1 code running in a different process. (This can only be done in IIS 6.0 and above, i.e. not in Windows XP)

    However as nobugz says - .Net 2.0 through to .Net 3.5 all use the same CLR, and so different versions of .Net code can be mixed in the same assembly without worry - this also holds true for IIS (.Net 2.0 and .Net 3.5 code can happily co-exist in the same app pool)

提交回复
热议问题