Click here to Skip to main content
15,443,631 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
I have a large library of C # functions that I share with WinForms, Wpf and Asp.Net projects and I use DevComponents and DevExpress controls. I have read what little information Microsoft has about migration and have followed the steps, for example installing Microsoft.Windows.Compatibility, and now I am trying to migrate to .Net5 but I don't see how to achieve it. I explain some problems:

1.- I use "Analizer Assembly Portability" with one of the simplest .dll libraries and I get the error: "T: System.Data.SqlClient.SqlException", "Net5", "Not Supported".
2.- When trying to compile I get the errors:
-System.Web.UI, Microsoft.Office, System.IO.Compression.ZipArchive "Does not exist in Namespace."
3.- It can't find the DevComponents and DevExpress controls and I can't see how to add them. Net5 not compatible with .Net 4.7.2 Dlls?
4.-Asp.Net projects are no longer supported and now we have to throw them away and learn Blazor. Excuse me?

I have read that Microsoft says that some APIs are not available but that they may decide to implement them again in the future.

If something is not already available but an alternative is not given, how are these problems solved?

As for DevExpress, I have seen that now the way to install the controls is through Nuget that connects to its server indicating the client id. Don't you accept local dll libraries?

Do you have to study a career to be able to migrate to Net5 or is there an alternative way like an expert to connect and perform the migration? Can you create support for experts to be the ones to connect and migrate the projects?

I see that there is almost no information from people who want to migrate or have made the migration.

Microsoft says that .Net6, which is coming out, will not be compatible with .Net5.
It also says that if some namespace or technology is not available that you contract it with a third-party package. Excuse me? For example, Reflection must be replaced by a third-party package? It does not exist. How do you do it? Are there companies that are more expert than Microsoft in the Microsoft System or is it a way to solve their problems with a simple phrase leaving those problems to the users?

Net5 and Net6 are a way to keep Microsoft employees busy but it is not possible for most companies to do the migration, so will we all stay on .net 4.7.2 except Microsoft and some people?

What do we do in the next few years? Do we keep working for years on 4.7.2 even if they don't update it?

How can this problem be addressed? Because it is not resolved with the minimal information that microsoft has published.

What I have tried:

in internet.in internet.in internet.in internet.in internet.
Posted
Updated 18-Oct-21 1:45am
v4
Comments
BillWoodruff 17-Oct-21 4:37am    
good essay/question ! for the DevX and DevComp components, I'd ask the companies what they are planning.

As we have a small development team and complex applications we did not dare to migrate our applications yet, but I found a good article that shows how to calculate the difficulty:
Tools for Estimating Your .NET 5 Migration[^]
 
Share this answer
 
Comments
BillWoodruff 17-Oct-21 4:35am    
+5
This seems more like a rant than a question. That said, the post's question seems to be summarized as:

"I have a relatively complex set of applications that have a number of 3rd party dependencies and are built on legacy .Net frameworks such as ASP.Net and utilize other complex API's such as the MS Office API. How can I migrate from targeting .Net Framework to .Net Core/5+?"

This is actually a very complex process that I and my team are currently in the middle of and will take us a long time to finish. The link provided by @RickZeeland gives a good high level overview of getting a scope of the process.

The first thing that needs to be understood is that you should think of .Net Core/5+ as a completely separate runtime environment than .Net Framework (up through 4.8) that just so happens to have a lot of similarities/overlap in terms of base class libraries and language. But, a number of technologies were not migrated to .Net Core/5+, which is what makes the migration challenging.

To get started, looking over Rick's link is good and list out all your dependencies. Determine which ones are not available as-is in .Net Core/5+, which ones have a migration path, and which ones need to be totally rewritten.

As an interim step of migrating for a large complex set of applications, evaluate which of your in-house written libraries can be converted to target .Net Standard 2.0. .Net Standard 2.0 libraries can be targeted by .Net Core and .Net Framework applications, so this allows you to break down some of your transition into manageable chunks.

For third party libraries, most of the major component library providers such as DevComponents and DevExpress already have .Net Core/5+ targeting libraries, so you should just download them.

After you get the 3rd party dependency libraries handled, converting your WinForms and WPF applications themselves should be relatively straightforward since they migrated those technologies over.

Your web applications will pretty much need to be rewritten, though you should be able to reuse some/most of your existing code in those applications. Research ASP.Net Core as that's the new "flagship" web framework for .Net Core/5+.

At this point, it's just going through step by step of each component and library and convert them over. MS has put out a number of blog posts and articles about migrating many of the frameworks and libraries, which to be fair they should aggregate in an easy to find and navigate portal as everyone on .Net Framework applications has questions like these (including me). To find them, you'll need to try searches for specific components, such as "migrate SqlClient to .Net Core". And yes, many of the solutions, especially for company/Operating system/application specific libraries are now Nuget packages. This is in keeping with the desire to have .Net Core be cross-platform.

To directly address some of your bullet points:

1. System.Data.SqlClient doesnt exist in .Net Core. Search and use the Microsoft.Data.SqlClient nuget library. I personally found this migration to be straightforward - I just added the Nuget package, and did a find-replace for all the 'using System.Data.SqlClient' strings to 'using Microsoft.Data.SqlClient'.

2. System.Web.UI - likely have to just rewrite your web app. Microsoft.Office - I've not done this one personally, but likely you'll need to do a specific search for that component's migration, something like "Microsoft.Office migration to .Net Core", and certainly it will be a nuget package if it exists.

3. As mentioned earlier, check out the vendor's websites. They'll have .Net Core targeting libraries.

4. You dont have to convert them to Blazor, in fact that's a new technology and probably shouldnt be what you migrate your existing ASP.Net app to. As noted earlier, research 'ASP.Net Core'. (Someone else can offer more on this - maybe Blazor is the right answer. We're converting to ASP.Net Core though).

"Microsoft says that .Net6, which is coming out, will not be compatible with .Net5."
Can you post a link to this? They should be fully compatible, .Net 6 just has a bunch of new stuff over .Net 5, with just a few documented breaking changes.

Again, it's a complex process and will take time and planning and a lot of research. It's "easier" than converting from MFC or VB6 applications to .Net, which is what Windows devs had to do at the turn of the century. There should be significant benefits from migrating, but a lot of those benefits are realizable because they decided to abandon a number of legacy technologies and bad design decisions when making .Net Core.
 
Share this answer
 
Comments
Member 14890678 18-Oct-21 10:55am    
So 99% stay on .net 4.8 and the rest, Microsoft and some, go to .net6 but they cannot do many things because they are pending programming. Okay. Thanks for your explanation. In any case, the technical support that Microft thinks it has already given with its tiny information is completely missing.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900