Server GRPC core Implementation of GRPC.core in .NET framework 4.8 - grpc-dotnet

Samples for grpc.core server implementation in .NET framework 4.7
We are planning to migrate from .NET framework to .NET core (.NET6). As part of this migration, we want to first move to grpc.core from WCF. When we searched for sample service implementation using grpc.core in .NET frameowrk 4.7, we ended up getting nothing. All the results were pointed to the implementation using grpcdotent in dotnet6.

Here is a grpc.core server and client hello world example
This example's server project targets .NET Core 3.1 but you can essentially use the same code/approach for .NET 4.7

Related

How to fix problem with Entity Framework Core v3.1.31 looking for Microsoft.Bcl.HashCode 1.0.0.0

We're in the process of converting old .NET 4.7.2 code to .NET 7. In the migration we're creating some .NET Standard 2.0.3 projects and moving the data layer code into one so it can be used by both .NET versions. But to do this we need to use an older version of .NET Standard (2.0.3) and Entity Framework Core v3.1.31.
For all of the other developers on our team this works fine. However for myself, when I run the code I get an exception thrown from the data layer .NET Standard project that it couldn't load Microsoft.Bcl.HashCode 1.0.0.0. The weird thing is that the Entity Framework Core version we're using is referencing Microsoft.Bcl.HashCode 1.1.1
I can't find any reference to the 1.0.0.0 version of Microsoft.Bcl.HashCode. Any idea what might be going on?

How to use EF Core 6.0 with an application that uses .Net Framework?

I have a situation where an application uses various component libraries. The libraries were based on .NetStandard2.0/2.1 and internally used EF Core 3.1. For various deployment and development reasons, we now want to target EF Core 6.0, which raises the following issues.
Net Core 3.1 support runs out in December 2022 so we need to move away from it.
The application uses Net Framework functionality and cannot move to Net Core.
EF Core 6.0 does not support NetStandard, only Net 6.
Changing the library that uses EF Core to target NET 6 means that components referencing it also need to reference Net 6.
Dependencies trickle down to the application that targets Net Framework and, as a result, the application no longer builds because Net Framework is not compatible Net 6.
How can the Net Framework application use the Net 6 assembly? Or, more specifically, how can a Net Framework application use libraries that internally use EF Core 6.0?
The interface between the application (Net Framework) and the one single touch point library component (Netstandard) is very well defined. Maybe Pinvoke could solve the problem? Or something simpler that I have overlooked?
Somewhat related question: NU1202 Package Microsoft.EntityFrameworkCore 6.0.3 is not compatible with netstandard2.1
Other than process to process communication between .NET Framework and .NET 6, this is not supported (for example via a Web API or similar)
As a short term solution, you can change your .Net Standard 2.0 EF Core libraries to be multi targeted to both .Net Standard 2.0 (which will reference EF Core 3.1) and .Net 6 (which will reference EF Core 6). This will let your .Net Core apps use EF Core 6, while allowing your .Net Framework apps to use the same dlls, but to be using EF Core 3.1. I realize that EF Core 3.1 support ends December 2022, but it will keep things moving.
https://learn.microsoft.com/en-us/nuget/create-packages/multiple-target-frameworks-project-file
Btw, has Microsoft even attempted to address the fact that a .Net Framework application cannot reference .Net 6, therefore it cannot use EF Core 6? This is a major issue for us, as we were sold the idea that .Net Standard could be shared between .Net Framework and .Net Core, but this has ceased to be the case since .Net Standard 2.1 was introduced, and now MS has pushed all new features, like EF Core, to .Net 6.

Where is Entity Framework in Visual Studio 2017?

I've verified that Entity Framework 6 Tools is installed as suggested in other answers on this site, but ADO.NET Entity Data Model never shows up in the New Items/Data list. I've also tried installing the .NET CORE 2.0 SDK as other answers have suggested to no avail.
To be clear, I'm not creating a .NET CORE application, I'm just trying to make a class library based on .NET framework 4.6. I created the project via .NET Standard and selected Class Library (.NET Standard).
I just need to install EF so I can do a code first generation from my existing SQL Server DB.
Don't use .NET Standard, select a .NET Framework project type.
.NET Standard is an abstract "Core or Framework" option, as if the naming wasn't confusing enough.

Where is the "System.Composition.TypedParts.dll"?

I am trying to use the ContainerConfiguration type from the Managed Extensibility Framework (MEF). According to here, it lives in "System.Composition.TypedParts.dll" which is part of .NET Framework 4.5. But I cannot find it in Add Reference for a .NET 4.5 application.
Where can I find this DLL?
It turned out to be part of MEF 2, which needs to be installed with NuGet. It's not distributed with .NET Framework.

Convert MVC2 .NET 4 application to run on .NET 3.5

This might seem like an odd request, but is there any simple way to downgrade my ASP.NET MVC2 application running on .NET 4 (developed in VS2010) to run on .NET 3.5? I'm asking because the server I will be using to host the application on is within my university and only has.NET 3.5 installed.
Many thanks
The ASP.NET MVC 2 is built against .Net 3.5 so there is no downgrade needed there. The only problem you might have is your own code - if you are using some .Net 4.0 specific stuff you will have to change it. For starters change your projects target framework (in project properties) to 3.5 and check if it still builds.