简体   繁体   中英

Is there a strategy to back-port C# code?

I intend using the Argotic framework in support of a .Net Atom server. Unfortunately my target server (over which I have no control) only has .Net 1.1 - any the Argotic library is only in .Net 2 and 3.5.

So, I now need to back-port the code to 1.1.

Can anybody provide any strategic tips for this undertaking?

I'm aware of the merits of using Unit Tests to verify the ported code ( here ).

  • should I be looking for automated tools?
  • should I just import the code into VS2003 .Net 1.1 project and work through the compiler warnings?

Any tips appreciated.

cheers, Ian

Making the code 1.1-compatible is tricky; not only to overcome the (very significant, in many cases - generics being the most notable, but by not means the only) language issues, but also the core framework. Avoiding the new features, bug-fixes, behaviour changes, etc is hard.

In most cases you will struggle to re-write 2.0 code in 1.1 (lets pray there aren't any iterator blocks, for example). Oddly enough I'm re-writing some code at the moment, and by accident of design it happens to be a good fit for 1.1, but that is an extreme edge-case. In most cases it isn't worth it.

So if you want to go that route, be prepared to spend significant effort doing it.

I think you could work your way around many of the new features like generics and extension methods, but if Argotic uses new technologies like LINQ to Entities or WCF, you will probably be in trouble.

Maybe your best option is talk to the people who are in charge of the server?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM