Can I use a .NET 4.0 library in a .NET 2.0 application?

后端 未结 7 1350
逝去的感伤
逝去的感伤 2020-11-28 08:03

I\'m running into some problems using my .NET 4.0 libraries in .NET 2.0 applications. I guess I was under the impression that being a Windows DLL, my other .NET apps would

7条回答
  •  没有蜡笔的小新
    2020-11-28 08:37

    I had a similar problem with my application where I was not able to reference an API, that was using .net 4.0 components.
    To resolve this I created a new class library project that was referencing my .net 4.0 project and then called that new assembly from my .net 2.0 project. I mapped the data coming back from .net 4.0 project to be used by my .net 2.0 project.
    That resolved my issue.

提交回复
热议问题