Clarification on .NET 5 [closed] - .net-core

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I have gone through .NET 5 features and looks like everything is understandable but I have few points. Can anyone please correct my points that are listed below?
DOT NET 5 has a single CLR for both Framework and Core
DOT NET Standard is the way to share a library between the .NET framework and .NET core
As per the documentation, the .NET 5 is the next version of .NET Core. If we install .NET 5 on Linux, we can't create and run framework related projects on Linux because still, they are windows specific applications.
I think the backword compatibility from .NET 5/ .NET x to .NET Core 3.1/ .NET Core 2.1 will be possible if there are no breakage changes.
For .NET core 3.1, we can install the runtime and run the already built application. Is it the same case with .NET 5. we can just install the .NET runtime and run the .NET 5(Framework and Core) applications.

No, Framework and Core/5.0 have different CLRs.
Yes, .NET standard is effectively the bridge between Framework and Core/5.0. That said, Standard is effectively end-of-life (final version is 2.1) as Microsoft no longer wishes to support Framework going forward.
Yes. Framework applications are and always will be restricted to Windows only.
Yes.
No, you have never been able to execute Framework apps via a Core runtime or vice versa. You need the matching runtime for the type of application you are executing.

Related

Migrate .NET Framework 4.x projects to .NET Core 3.1 [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I have a project in .net framework, now I want to convert it to .netcore. what will be steps for doing this migration
From MS Documentation
Retarget all projects you wish to port to target .NET Framework 4.7.2 or higher.
Use the .NET Portability Analyzer to analyze your assemblies and see if they're portable to .NET Core.
Install the .NET API analyzer into your projects to identify APIs that throw PlatformNotSupportedException on some platforms and some other potential compatibility issues.
Convert all of your packages.config dependencies to the PackageReference format with the conversion tool in Visual Studio.
Create new projects for .NET Core and copy over source files, or attempt to convert your existing project file with a tool.
Port your test code.
https://learn.microsoft.com/en-us/dotnet/core/porting/
Enjoy reading... ;-)

When to migrate to Asp.net Core from Asp.net [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
Backgroud:
I want to make an informed decision about upgrading our application from the existing Dotnet framework to Dotnet Core.
The application is Asp.net based application hosted on IIS.
Current application project structure of the FA applications:
FASolution
FA.Utility - Dotnet framework 4.5
FA.Service - Dotnet framework 4.5 (depends on FA.Utility)
FA.Website - Asp.net MVC Dotnet framework 4.7 (depends on FA.Service)
Lifetime of the app: Foreseable future. The idea is keep upgrading the app.
What I want to achive?
Technology upgrade wishlist:
- Fully containarised CI
- Host the application in Azure/AWS
- Expose a web api endpoint
Scenario A:
FASolution
FA.Utility - Dotnet framework 4.5
FA.Service - Dotnet core (depends on FA.Utility)
FA.Website - Asp Dotnet core(depends on FA.Service)
Scenario B:
FASolution
FA.Utility - Dotnet core
FA.Service - Dotnet framework 4.5 (depends on FA.Utility)
FA.Website - Asp Dotnet core(depends on FA.Service)
Questions:
Is it worth upgrading to .net core and why?
Should I upgrade all the above three projects to target Dotnet core at once?
'FA.Utility' for example is referencing third party libraries. Is this going to causing issues during upgrading?
Can the two frameworks coexist in production for both Scenario A and Scenario B, and if so can you foresee any issues?
To answer your first question "Is it worth upgrading to .net core and why?"
Microsoft maintains both runtime for building applications with .NET, and they share many of the same APIs. This shared API is what is called the .NETStandard.
.NET Core is used to create server applications that run on Windows, Linux and Mac. It does not currently support creating desktop applications with a user interface.
Developers Should Use .NET Core When
A cross-platform and open-source framework, it can be used to develop applications on any platform. Often it is used for cloud applications or refactoring large enterprise applications into microservices.
when should you use it? When..
There are cross-platform needs. Use it when the application needs to run across multiple platforms such as Windows, Linux and macOS. Those operating systems are supported as development workstations (and the list of supported operating systems is growing):
Visual Studio can be used on Windows with a new limited version on the macOS.
Visual Studio Code can be used on Windows, Linux and macOS.
The command line can be used on all supported platforms.
Microservices are being used.
When Docker containers are being used.
If you have high performance and scalable system needs.
If you are running multiple .NET versions side-by-side.
If you want command line interface (CLI) control.
Second question "Should I upgrade all the above three projects to target Dotnet core at once?"
In my opinion, if the platform is continuously evolving and will be there in future, Upgrade all your app in dot net core.
Third question "'FA.Utility' for example is referencing third party libraries. Is this going to causing issues during upgrading?"
Since dot net core is upgrading and evolving, it might be possible that it doesn't have support for the third party library, so upgrade FA.Utility project when you are sure that the thrid party libraries are supported by dot net core.
fourth question "Can the two frameworks coexist in production for both Scenario A and Scenario B, and if so can you foresee any issues?"
Yes it can coexist.
Hope it helps.

Which one is the best target to migrate an ASP.NET project, .Net Core or .Net Standard? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
Please do not consider this as a duplicated question. I'm going to migrate my ASP.NET RESTful web-api (.Net Full) project to .Net Standard or .Net Core and I faced a serious question which I could not find the answer in other similar questions.
What I'm looking of this question is to realize while I can choose .Net Core, Why should I target my library assemblies on .Net Standard?
Maybe one reason is to keep these assemblies ready to use them in a .Net Framework project. Regardless of this, Is there any other reason to convince me to keep my target on .Net Standard?
Note: I do not need to keep .Net Full version of my project I just want to have a cross-platform version of it.
There is no choice to make. .NET Standard is only meant for .NET Class libraries. It's not a runtime so one can't create applications that target it. The runtimes are .NET Core and .NET Full framework.
.NET Core is the only cross-platform option.
ASP.NET Core itself is a web stack that can run on both runtimes. You can pick the one you want in the New Project dialog.
When it comes to libraries, the choice depends on what's needed. .NET Standard libraries can target any compatible runtime. ASP.NET Core's own Razor Class Libraries are .NET Standard 2.0 projects. Most NuGet packages are .NET Standard-compatible to avoid the hassle of packaging different versions for every runtime.
On the other hand, the latest Span-related features appear only in .NET Core 2.1 and later. They aren't available in .NET Standard 2.0 but they will appear in 2.1. This sample from All About Span: Exploring a New .NET Mainstay would only work in .NET Core 2.1+ :
string input = ...;
ReadOnlySpan<char> inputSpan = input;
int commaPos = input.IndexOf(',');
int first = int.Parse(inputSpan.Slice(0, commaPos));
int second = int.Parse(inputSpan.Slice(commaPos + 1));

How to switch an old .NET project to Linux? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have a ASP.NET Framework 4.0 WebForms project running on several Windows servers. I wonder about the goals I should achieve to be able to host the project under Linux. Let us suppose I refactor the project and upgrade the version of the Framework to 4.5 or 4.6. If we assume that I do not have Windows-specific code in my project either because I never had such a code, or because I refactored it to not assume Windows-specific properties. My question is: what are the known mainstream .NET components that will break under Linux?
No matter how well you assert it on Windows, running the web app on Linux and Mono can reveal what does break.
This question therefore is too broad. I blogged about running ASP.NET 4.x web app on Mono,
Jexus Web Server and ASP.NET Cross Platform
I was invited by Mingzhi Yi to give a talk at Jiaodong Developer Conference 2015 on 12 Dec. It was about my opinions on Jexus and ASP.NET cross …
https://blog.lextudio.com/2015/12/jexus-web-server-and-asp-net-cross-platform/
You should note that .NET 4.6 might not be well supported on Mono, as it evolves slower than .NET.

Is .NET Core stable to start a real product? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I have a big website that developed with MVC5 and I wanted to convert it to .Net core.
Everything works great but when I wanted to add my references to .Net core edition of my project I saw that .net core just accepts References of .net core type or some references that can be install from nuget.
I decided to convert my DLL References to .Net core dll types and because of this create a new .Net core class library but when i click to add some references to this class library like Syste.Drawing , I saw there is nothings on references list.
After some searching on google I founded some posts like
Server-side graphics in ASP.NET Core
Manipulating images with .NET Core
....
After encountering with this problem I was thinking may be it's possible I encounter with a problem like this who I can not handle it in .Net core and I should stand by until Microsoft releases a more complete edition of .net core.
Now the question is that is .net core stable to start a real project/product or
not?
As always the decision depends on what do you want to achieve.
ASP.NET Core is a brand new web framework with cross plattform and performance in mind. In these days "real projects" are developed based on the version 1.0. The code for 1.0 is released and supported by Microsoft - so this is production ready. The tooling itsself is in preview (Visual Studio integration).
If cross plattform is not a major requirement for you right now, then you can choose Windows as plattform for your application and you can access the whole .NET Framework including the many, many libraries of the .net world. Later on you can swap to .NET Core libraries by the time more and more libraries will support .net Core.
As it is a version 1.0 there are typical pitfalls compared to a long lived web framework like ASP.NET. Documentation is in progress or features that you might miss these days (like SignalR) can be a major no go for you.
So you have to investigate to gain the information specific to your requirements. ASP.NET Core is production ready starting point especially if you plan a new product from scratch.

Resources