AppFabric .Net Core - .net-core

Is there any library used to interact with AppFabric compliant with .NET Standard o .NET Core?
All the library I could find on nuget are related to ServerAppFabric.Client which seems be compiled only for .Net Framework 4.X
I know Microsoft already ended AppFabric support but for the moment changing the caching mechanism in the entire architecture would be the last option.

Related

What does lightweight mean in .net Core

I am reading an ebook about Docker and Microservices. It referred the .net core was lightweight compared with traditional .net standard.
I don't quite get the story behind it. Can someone give some explanation about this?
This is because .Net Core is optimized for microservices and dockers.
In short, .Net Core doesn't offer as many things as another classic implementation of .Net Standard, reducing its size which even allows for an app to be packaged with all dependencies (and so not needing any installation of .Net on the running machine). This is why I think it could be called lightweight.
See :
https://msdn.microsoft.com/en-us/magazine/mt842506.aspx
https://learn.microsoft.com/en-us/dotnet/standard/choosing-core-framework-server
About light weight of .net core app
I am reading an ebook about Docker and Microservices. It referred the
.net core was lightweight compared with traditional .net standard.
I think here you are referring to .net core is lightweight than .net frameworks as .net standard are just API specifications for implementing base class libraries by different frameworks.
Please refer to below link for more information:
https://www.infoq.com/news/2017/10/dotnet-core-standard-difference/
https://medium.com/wolox-driving-innovation/net-core-vs-net-framework-a694f1fbdb26
Now coming back to why .net core framework is lightweight .net 4.5 or other frameworks as it's modular. When you create or run an application you don't need to install all dependencies which you do not need unlike .net 4.5 or other frameworks where everything is installed.
Basically, .Net framework has been split into individual pieces implemented using CoreFX for .net core framework which makes .Net core lightweight.
Link for details - https://www.tutorialspoint.com/dotnet_core/dotnet_core_managed_extensibility_framework.htm

Can I use Entity Framework 6 (not core) in .net core?

Entity Framework Core does not support spatial data, which I need to use in my app.
Can I use Entity Framework 6 in .net core? If so, how can I register DatabaseContext in Startup.cs?
Update
You can now use EF 6.3 with .NET Core 3.0:
https://devblogs.microsoft.com/dotnet/announcing-ef-core-3-0-and-ef-6-3-general-availability/#what-s-new-in-ef-6-3
Below is an excerpt. However, EF Core has come a long way these days and it's worth giving it another go before going back to something that's reaching end-of-life soon. Specifically for your issue, EF Core supports mapping to spatial data types using the NetTopologySuite spatial library since version 2.2.
What’s new in EF 6.3
Support for .NET Core 3.0
The EntityFramework package now targets .NET Standard 2.1 in addition to .NET Framework 4.x.
This means that EF 6.3 is cross-platform and supported on other operating systems besides Windows, like Linux and macOS.
The migrations commands have been rewritten to execute out of process and work with SDK-style projects.
Support for SQL Server HierarchyId.
Improved compatibility with Roslyn and NuGet PackageReference.
Added ef6.exe utility for enabling, adding, scripting, and applying migrations from assemblies. This replaces migrate.exe.
There are certain limitations when using EF 6.3 in .NET Core. For example:
Data providers need to be also ported to .NET Core. We only ported the SQL Server provider, which is included in the EF 6.3 package.
Spatial support won’t be enabled with SQL Server because the spatial types aren’t enabled to work with .NET Core.
Note that this limitation applies to EF 6.3 but not to EF Core 3.0. The latter continues to support spatial using the NetTopologySuite
library.
There’s currently no support for using the EF designer directly on .NET Core or .NET Standard projects.
Original Answer
It isn’t ready yet, but starting with .NET Core 3.0, you will be able to.
https://blogs.msdn.microsoft.com/dotnet/2018/05/07/net-core-3-and-support-for-windows-desktop-applications/
Similarly, EF6 will be updated to work on .NET Core 3.0, to provide a simple path forward for existing applications using EF6.
https://youtu.be/GN54OV5cCBM?t=1146
But there's also EF6, which we've already announced is going to be ported to work on .NET Core...
UPDATE: Yes, EF6 has been cross-platform since version 6.3. https://devblogs.microsoft.com/dotnet/announcing-ef-core-3-0-and-ef-6-3-general-availability/#what-s-new-in-ef-6-3
ORIGINAL ANSWER THAT IS NOW INVALID: No, you can not directly, because EF6 doesn't support .NET Core.
But, you can create another project, that compiles against full .NET framework and use it as a reference.
MS has actually made a decent tutorial for this:
https://learn.microsoft.com/en-us/aspnet/core/data/entity-framework-6#reference-full-framework-and-ef6-in-the-asp-net-core-project
UPDATE: Yes, EF6 has been cross-platform since version 6.3. https://devblogs.microsoft.com/dotnet/announcing-ef-core-3-0-and-ef-6-3-general-availability/#what-s-new-in-ef-6-3
ORIGINAL ANSWER THAT IS NOW INVALID: Like #Niko said, you cannot directly with EF6 but there is a fork that allows it.
Disclaimer: I'm the owner of the project Entity Framework Classic
Entity Framework Classic is an EF6 fork. It's everything you like about EF6, but with better performance, must-have features, .NET Core support, and more.
There is a FREE Community version that includes pretty much everything and an Enterprise version that include additional features.

.Net Core Assembly issues

I am converting an existing .Net framework 4.6.2 Project into a .Net core project. I have some of the DLLs in the .Net framework 4.6.2, while some DLLs are not supported in .Net core. Below is the list of those DLLs. Can any one give me the solution?
System.ComponentModel.Composition
System.Runtime.Remoting
system.serviceModel
The following is based on a comment I added to the question:
System.Web and System.ComponentModel.Composition are both supported and provided for .NET Core version 2.0, as can be seen here and here.
(as a side note: https://apisof.net/ is a wonderful resource, provided by Microsoft to aid in figuring out which APIs are available in the different .NET platforms).
But System.Runtime.Remoting is not supported by .NET Core at this time.
The listing for System.ServiceModel shows that it is supported in .NET Core, but only when Platform Extensions is included along side it.
If you need access to Windows or .NET Framework specific APIs, then it's recommended that you don't use .NET Core for the project or create a .NET Standard class library/project which includes the .NET Framework specific code and consume the outputs of that.
The following are some resources to help with .NET Core and .NET Framework API specific issues:
https://apisof.net/
Immo Landwerth's videos on what .NET Standard is, and how it relates to the different .NET Platforms (he's the PM for .NET Standard)
A blog post I wrote about .NET Standard and how it fits into the .NET ecosystem
A blog post from codeshare.co.uk describing the key differences between .NET Framework and .NET Core
A blog post from Stackify discussing the differences in .NET Framework and Core API space

.NET Core project add reference to .NET Framework project. Why it's possible?

I have followings projects:
.NET Core 2.0 Web Application
.NET Standard 2.0 Class library &
.NET Framework 4.5 Class Library.
I add reference of .net framework class library to asp.net core web api project. and it seems it works very well.
I am wondering why it's possible to add reference of .NET Framework class library project to ASP.NET Core Web API or MVC?
It's not supposed to allow adding only Standard or Core libraries references to Core projects?
Is this core Web project with .NET Framework class libraries references still cross platform?
UPDATE
According to Phiter comment:
"If you import a .net framework library to your project it'll no longer be cross platform, but you can do it freely if you want to. They allow it because you might want to use .net core and still be on windows."
So if this is a reason, if I want to bind my project to .NET Framework and remain on windows why I use Core Web Project from the first place?
I thought we use core projects for cross platform ability and if not, the .Net framework is not a better option?
UPDATE
mason comment:
"Nothing funny: ASP.NET Core project doesn't have to run on .NET Core. It can also be run on .NET Framework.
Just because it's called 'Core' doesn't mean they're related. They could have called it ASP.NET FancyPants and had it run on .NET Core and .NET Framework and you wouldn't be as confused. Microsoft just sucks at naming things."
UPDATE (November 12, 2018)
A first look at changes coming in ASP.NET Core 3.0 - Fully leveraging .NET Core
As announced on the .NET Blog earlier this month, .NET Framework will get fewer of the newer platform and language features that come to .NET Core moving forward, due to the in-place update nature of .NET Framework and the desire to limit changes there that might break existing applications. To ensure ASP.NET Core can fully leverage the improvements coming to .NET Core moving forward, ASP.NET Core will only run on .NET Core starting from 3.0. Moving forward, you can simply think of ASP.NET Core as being part of .NET Core.
Customers utilizing ASP.NET Core on .NET Framework today can continue to do so in a fully supported fashion using the 2.1 LTS release. Support and servicing for 2.1 will continue until at least August 21, 2021 (3 years after its declaration as an LTS release) in accordance with the .NET Core support policy.
This was just added as part of .NET Standard/Core 2.0. As long as the .NET Framework dll only references things in the .NET Standard, it will use type forwarding to the .NET Core implementations.
I do not know what made Microsoft allow referencing .net framework class library into .net core project but as a programmer, I am happy with this allowance.
You see allowing .net core application to reference .net framework libraries is useful in case you want to start with windows and are planning to go cross platform in the future.
We are in a stage where many useful open source libraries do not fully support .net core till the date of this post, masstransit is an example, so when I am developing a new software I will be using .net core project that depends on such libraries and I will update them later when they support .net core.

Class library that can be shared between .NET Framework and .NET Core

I have a big class library written in .NET 4.0 but when I reference it in a Store App that uses .NET Core, it shows an error. And further, Microsoft just released .NET Core for the next version of .NET.
I want to know what type of project will be able to be shared by both .NET 4.6 and .NET Core? Is a class library able to do that?
It seems that the release of .NET Core specialized for Store Apps causes confusion for me.
If you have a PCL (Portable Class Library) that works for Metro apps, it will definitely run on the fully fledged .NET (aka, your normal ASP.NET, WF, WPF applications).
That means that you don't have to do anything, besides porting your existing library to be compatible with the PCL you choose.
There is a new target called dotnet which you can use to target the platforms DNX, UWP and .Net 4.6. Effectively, this libraries are build against .Net Core packaged libraries instead of the libraries of the full .Net Framework.
Read more here: https://oren.codes/2015/07/29/targeting-net-core/ and related posts.

Resources