开发者

Calling .NET 2.0 assemblies in .NET 1.1

Recently I developed a internal framework in .NET 2.0 version, which is basically classes and helpers.

The problem is I have some .NET 1.1 sites and a开发者_C百科pplications and would like to use my framework from them. I know that I can't call .NET 2.0 in .NET 1.1, but I have an idea.

If I create another 2.0 project with ComVisible and reference some of my 2.0 assemblies, then recreate my needed functions only referencing these classes, and in .NET 1.1 call this new ComVisible assembly; could I then use 2.0 assemblies in .NET 1.1?

If this works basically I can use it in .NET 1.1, Java Reflection, etc.

Or am I wasting my time?


I don't see why you'd want to go through all of this effort. There are only two possibilities - either:

  1. The servers/workstations running those sites/applications have the .NET Framework 2.0 installed, in which case you might as well just re-target those sites/applications to .NET 2.0 and rebuild/redeploy them (which should take all of 10 minutes), or

  2. The servers/workstations do not have the .NET Framework 2.0 installed, in which case all your COM effort is for naught because the 2.0 assemblies themselves won't be able to run without the Framework.

I recently re-targeted a whole bunch of "legacy" 2.0 apps to 3.5 as in #1 without a single problem. I know that there were a tiny handful of breaking changes from 1.1 to 2.0, but they are so few in number that it would almost certainly take less time to search for those than it would take to deal with all that COM craziness.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜