"Scaffolding failed. Could not load information for project..." in .NET 6 Web API - asp.net-web-api

I got this message when trying to create an API Controller.
I did seperate API project referrence to DBContext and entities in another class library.
Error Message
I have tried the same project with .NET 5, it's working well but not .NET 6.
Please help me!

Trevoir Williams from Udemy said: Versions 6.0.8 and 6.0.9 you can reduce the version of the EntityFrameworkCore* libraries to 6.0.7 in project file
Or change EntityFrameworkCore* version in NuGet package manager
Again, all this information and images I get from Trevoir Williams. I think this issue will be solved quickly. In this time, this is the fast way for everyone love .NET 6.

I had the same issue and solved updating:
Microsoft.EntityFrameworkCore to 6.0.9
Microsoft.EntityFrameworkCore.Tools to 6.0.9
Microsoft.VisualStudio.Web.CodeGeneration.Design to 6.0.10

Related

How to install Umbraco on VS2015?

I'm following the guide oninstalltion Umbraco here. It seems that they don't mention VS2015but I followed as closely I could by installing it into an empty MVC 5 project.
However, as I install UmbracoCMS via NuGet, I see this error (and a bunch of alikes, all nagging about DNX 5 being not supported).
NU1002 The dependency Microsoft.AspNet.WebHelpers 3.2.3 in project PocUmbraco does not support framework DNXCore,Version=v5.0.
c:\users\chamster\documents\visual studio 2015\Projects\PocUmbraco\src\PocUmbraco\project.json
I'm very unclear what to do about it. I've googled but didn't find anything helpful, likely due to ignorance and limited experience with Umbraco.
You actually installed into a ASP.NET 5 project (which has MVC6).
You should not use the ASP.NET 5 template, but something like 4.5.2 or 4.6. DotnetCore is not supported by Umbraco. Not sure about ASP.NET 5, but according to this, it does not sound very supported to me:
https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/66903-umbraco-on-linux-with-aspnet-5
Also, leave out azure if you just want to get a POC running.
Then after you created your empty ASP.NET project, install nuget package UmbracoCms, and hit that F5 button and go from there :-)

asp.net 5 with azure service bus

Has anyone used ASP.NET 5 with Azure Service Bus? I tried adding the WindowsAzureServiceBus 3.0.2 nuget package to an ASP.NET5 application and Visual Studio cannot resolve Microsoft.WindowsAzure.ConfigurationManager for DNX 4.5.1.
Error I get is
Dependency Microsoft.WindowsAzure.ConfigurationManager could not be
resolved.
I had the same problem. It seems this is an old unresolved issue.
See related post: Can't install Windows Azure Service Bus nuget package
Similarly to the answer from the linked posted, I just manually added Microsoft.WindowsAzure.ConfigurationManager to the package.json. The dependency will be resolved and project will build. I tested sending a message to topic and things seem to work.
...
"WindowsAzure.ServiceBus": "3.0.9",
"Microsoft.WindowsAzure.ConfigurationManager": "3.1.0"

Microsoft ASP.NET Web API 2 on .net 4.0

Is it possible to use ASP.NET Web API 2 with .net 4.0? I tried to upgrade from an older version but I get:
Could not install package 'Microsoft.AspNet.WebApi.Client 5.0.0'. You
are trying to install this package into a project that targets
'.NETFramework,Version=v4.0'
To answer my own question:
No, it is NOT possible to use Web API 2 with .net 4.0:
This is taken from a slide by Damian Edwards. You can find additinal info here.
FWIW, I had a .NET 4.0 requirement on the client (die WinXP!), but I could do .NET 4.5 on the server. So, I have WebApi2 running server side, but the WebApi1 client package running on the client, handling serialization, etc.
Using the Package Manager Console in Visual Studio and choosing my client project in the default project dropdown, I was able to:
Install-Package Microsoft.AspNet.WebApi.Client -Version 4.0.30506.0
Everything thereafter worked well.

could not load file or assembly 'system.core version=2.0.5.0

I was trying to use ReactiveUI in a WPF application that makes use of Prism. I installed the packages with NuGet, but simply adding the references led to the exception specified in the title during the initialization of the ModuleCatalog.
Edit:
As Pierre Arnaud pointed out, the problem is Microsoft.Bcl.Async not being able to resolve System.Core version 2.0.5.0.
We moved to Visual Studio 2012 since i first posted this question. The same problem persists and i can't even install the fix suggested by Pierre since i have installed .Net 4.5 now. The project is still targeting .Net 4.0.
Please install KB2468871, which solves the issue related to Microsoft.Bcl.Async not being able to resolve System.Core version 2.0.5.0.
See also Issue 8 in the async targeting pack knowledge base.
Here are the direct download links for the fixes, for the x86 and x64 environments:
http://download.microsoft.com/download/2/B/F/2BF4D7D1-E781-4EE0-9E4F-FDD44A2F8934/NDP40-KB2468871-v2-x86.exe
http://download.microsoft.com/download/2/B/F/2BF4D7D1-E781-4EE0-9E4F-FDD44A2F8934/NDP40-KB2468871-v2-x64.exe
This isn't happening for me. Is it possible that NuGet has added the SL5 DLLs as a reference to your project?

How to install SignalR.Client.NET35 to a project

I am using SignalR 0.5.3, installed via NuGet, for my .NET 4.5 Web Application - now, since I need to push data from SQL SERVER 2008R2 (supporting only the .NET Framework up to 3.5), I need to create a library using the SignalR .NET 3.5 Client.
I have seen in the project website that there is probably a SignalR.Client.NET35 version but (being not very familiar neither with github nor with NuGet) I have no clue how to install that client for the library project I have to work on.
I have tried installing with the std command install-package SignalR.Client but the message i get is:
Install-Package : Could not install package 'SignalR.Client 0.5.3'.
You are trying to install this package into a project that targets
'.NETFramework,Version=v3.5', but the package does not contain any assembly
references that are compatible with that framework.
For more information, contact the package author.
so it looks like the right .NET version is not picked correctly/out of the box.
Before bothering the author, i thought to give a try round here.
Any suggestions?
We haven't packaged the 3.5 client into the package as yet. You'll need to build from source.
I backported the v1.x and v2.x SignalR clients to NET 3.5. Available as NuGet packages here: http://www.nuget.org/packages/Nivot.SignalR.Client.Net35/

Resources