What's the best way to migrate from preview version of .NET Core to the latest version? - visual-studio

I have a site built in .NET Core 1.0 Preview 2. It's using the deprecated xproj file. I need to migrate the project to the lastest .NET Core 3.1.
Would it be simpler to try and go through all the migration steps listed below for each new version one at a time or would it be easier to try creating a new site in 3.1 and trying to just move my code over?
https://learn.microsoft.com/en-us/aspnet/core/migration/1x-to-2x/?view=aspnetcore-3.1
If the better answer is go through each migration one at a time, there are there any good walkthroughs on migrating from the preview version to .NET Core 1.0?

Related

how to resolve target .NET Framework with Xamarin

i am new to development with Xamarian platform.Now i just want to run application to targetFramework 4.5. but there diff targetframework listed as below. how i resolve that please help me out.
See https://learn.microsoft.com/en-us/dotnet/standard/net-standard - in the table, note that .Net Framework 4.5 supports the newer net-standard up to 1.1. So choose .NET Standard 1.1. Or if you can require .Net Framework 4.5.1 and newer, choose .NET Standard 1.2.
Or better, whatever dependency is forcing you to use Framework 4.5, talk to the vendor, get them to rebuild for .NET Core 3.1 or the new .NET 6.
If you really must support .Net "Framework" APIs, see https://learn.microsoft.com/en-us/archive/msdn-magazine/2017/connect/net-introducing-the-windows-compatibility-pack-for-net-core, for a (no longer being updated) solution that allows your newer code to be "Net Core", yet work with legacy .net APIs.
Be aware all this is "legacy" - Microsoft's goal is to move everyone to .NET 6.

Performance Issue after .net core 2.1 migration

Existing .Net framework 4.6.2 based web api project & class libraries have been migrated to .net core 2.1 webapi project & its class library have been migrated to .net standard 2.0 with very minimal core, mostly as part of migration either existing nuget package has been upgraded and existing package was swapped with .core compatible SDK version with very minimal/negligible code changes.
Right after the migration application's entire functionalities facing performance issue.
Once.Net framework based out code has been migrated to .net core, is the performance issue expected one?
Any effective open source tool to profile & measure performance?
Any mitigation to solve these performance issue? please suggest

How to upgrade core 2.1.1 to core 2.2.3

The official documentation does not work.
Do I need VS 2017 Preview?! Or to restart my pc every time I install "Latest stable 2.2.3" SDK's? Perhaps its not so stable? Should I try 2.2.1 lol
VS 2015 will work up for up to .NET Core 1.1 (now EOL). VS 2017 will work for up to .NET Core 2.2. .NET Core 3.0+ requires VS 2019.
It's not clear what your exact issue is, but the process is basically this:
Download the appropriate .NET Core SDK version. Be careful because the SDK version is somewhat independent of the .NET Core version. Pay attention to specifically what version of .NET Core the SDK supports, not the version number of the SDK itself.
Edit your project file and change the target to the new .NET Core version. This will be the minor version, not patch releates. In other words, for any .NET Core 2.2.X, you'd use netcoreapp2.2 as your target.
That's it. After you save, any NuGet dependencies of your project, such as Microsoft.AspNetCore.App will update to the latest version within that target, i.e. 2.2.X. However, note that some packages may not always have new versions. Most of the major parts of ASP.NET Core, for example, change enough with each version that the NuGet packages get bumped as well. However, it is possible that you may still use a 2.1.X package if nothing changed in that for 2.2. In any case, you'll be able to see in Visual Studio if it's fully updated or not.

How to convert NetFramwork 4 code to NetCore 2?

I have a C# project which was created using NetFramework 4.6. I want to convert it to using the NetCore 2.1.
I checked the network, and people say I can just change the Target Framework value in the project's properties page. But on my computer, I cannot see options for NetCore.
I already have the NetCore 2.1 SDK installed.
Is there another way to convert the project? Is there something wrong with my project that prevents it getting converted?
People are wrong, there is no such "one step" approach.
Remember that .NET Core is not a higher version of .NET Framework, it is rather a rewrite from scratch. So it does not work like retargeting .NET Framework version form 4.0 to 4.5.
Porting to .NET Core from .NET Framework is a good place to get started.
Edit: This page lists some differences between .NET Core and .NET Framework.
You can't do this simply like this; because of their totally different frameworks, not different versions of same framework. You have to port your project to .net core; there is one of the nice extension for visual studio that generate a report for you about how portable your code is between .NET Framework and .NET Core.
This is also one of the article about the issue that may be useful for you.

Integrate SignalR core version into SPA Core

I'm just want to ask you. SignalR now in alpha. And as I understand now in SPA Core version you have only old version of signalr, that won't work on linux. Is there any way to replace old version to new one? Or if you have roadmap on it, when are you planing to implement it in core version?
You can now download v3.4.1 of the template with the Abp.AspNetCore.SignalR preview.
Read the documentation for SignalR AspNetCore Integration.

Resources