I have an Azure WebJobs console app which needs to access a database built around Entity Framework Core 1.0. I'm running into a dependency conflict warning when the console app runs.
Apparently, WebJobs utilizes v6 of JSON.NET but EF Core requires v9, I think because of the IOptions based configuration capability of EF Core.
Is it okay to ignore this type of warning? I have to use a ConfigurationManager-based approach to configuring the console app anyway, because WebJobs doesn't understand the type of config file approach used by ASPNET Core. So I don't >>think<< the conflict will ever amount to anything.
But I'm out of my depth and would appreciate some expert feedback.
At currently, I would suggest you use Console Application core to create your webjob. The Azure Webjob template currently based on .Net Framework. Maybe will have some issues when use EF core in it. Here is a .NET Core for Azure WebJob Sample. For how to let Azure WebJobs with .NET Core RC2, please refer to this article.
Related
I built an ASP.NET Core application, but I have a hosting server which allows .NET 4.7.2 version only.
Is it possible to deploy to that environment?
As #marc_s already said that you cannot run .NET Core on .Net xxx
run time as two version has it's own runtime and they are different in
regards of its architecture.
If you have a .NET Core application, depending on its version, you could choose your runtime.
Here is the official release of all .NET Core versions:
Note
If you have any requirement where you need to communicate both .NET Core xxx version along with the Classic .NET xxx version, there is a way to build a bridge between them that is .NET Standard library.
The main goal behind .NET Standard was to establish greater uniformity in the .NET ecosystem. You can get more details in the official document here
Hope above explanation guided you accordingly.
I got lost very quickly in all the moves from .Net Framework to .Net Standard to .Net Core. Could someone please just tell me what I need to do to get my projects to work together?
Here's the situation: I've got a simple web service written in ASP.Net that contains a set of classes built by Entity Framework from an existing database using a "scaffold" command. The web service can respond to a request for a list of coils from a database. The list is delivered as a JSON-serialized string.
I have a simple mobile app developed in Xamarin. I want it to accept the JSON string and deserialize it into a list of Coil objects. To do that, I need to add a reference to the web service project. But when I try to do that, I get complaints that the targets of the two projects are not compatible.
The choices for target frameworks for the web service are .Net 5.0 and .Net Core 1.0 through 3.1. The choices for target frameworks for the Xamarin app are .Net Standard 1.0 through 2.1. I have been unable to find a combination of these choices that works. What choices should I use that would enable me to add a reference to the web service project to the Xamarin project?
Or should I split the Entity Framework-generated classes out into a separate library? That would probably be a better project structure anyway. In that case, I'd have three projects. The target framework chosen for the library would have to be compatible with frameworks chosen for the web service and the Xamarin app, but the framework for the web service would no longer have to be compatible with the Xamarin app's framework.
Or perhaps I should rebuild all of these from scratch. These are all trivial projects, done mainly for education, although the Xamarin app might be useful in the real world. Recreating them would be easy. Again, if I did this, what targets should I use?
All development has been done in Visual Studio 2019.
I once build a .NET Core Console App that contained a web host, so I could make controllers without using IIS. Isn't that possible in 5.0?
I need it to run as a service later. It used to be so easy :-)
I can't find any guides to that, but I can find guids addressing version 2.1.
Latest .NET Core project templates (and .NET 5 ones) use Kestrel by default.
You can find the related documentation here.
You can also find here specific documentation about running ASP .NET Core as a service in both Windows and Linux, and in the case of Windows, with and without IIS.
I am starting to port a EF6 application to EF Core. The app also uses Microsoft.AspNet.Identity.EntityFramework. However I am unable to find if it is possible to use that package with EF Core. It seems like I need to use
Microsoft.AspNetCore.Identity.EntityFrameworkCore, but this seem to force me to move to Asp.Net Core.
Is it possible to avoid that, i.e. Can I stick with AspNet and move from EF6 to EF Core or do I have to move from AspNet to Asp.Net Core at the same time? I have tried to find an answer in the docs, so any pointers would be helpfull!
You do not need to move your entire application to use the .NET Core because .NET Full Framework can reference .NET Core libraries. The opposite is also true, NET Core 2.0+ can reference full .NET Framework libraries.
However, Microsoft.AspNetCore.Identity.EntityFrameworkCore is dependent on Microsoft.AspNetCore.Identity and will not be able to 'talk' to Microsoft.AspNet.Identity.EntityFramework, at a minimum you would need to isolate your other dependencies on Microsoft.AspNet.Identity. It's not readily apparent if you will run into any conflicts but I would err on the side of caution and refactor your (Full .NET Framework) application to only depend on Microsoft.AspNetCore.Identity (Instead of both AspNet and AspNetCore simultaneously) which is completely feasible.
I am trying to build a .net core API using MVC, but I am trying to add it to an application that was not build on ASP.NET Core. When I try and configure the interfaces to be used in the core app (Setup.cs) I am not able to reference the interface. When trying reference the solution within the core app, I get the error
"The following projects are not supported as references: [solution name] has target frameworks that are incompatible with the targets in current project.
.NETCoreApp,Version=1.0
.NETFramework,Version=v4.5
What is the best way to be able to reference a .NETFramework project within a .NETCore project?
from comment above I realized it was not possible. I was not able to use the .net standard version in my core app.