install older version of packages in webmatrix 3 - asp.net

I need to install signalr package in my web matrix website .but when I use Nuget to add signalr to my project get an error signalr version 2 need .net framework 4.5 but as I know webmatrix only support .net framework 4 .How can I install older version of signalr with Nuget?

you can use the following command : Install-Package Microsoft.AspNet.SignalR -Version 1.2.0
Substitute version for the version of signalR you require, see down here the viable versions

Related

EntityFrameworkCore nuget packages confusion in Asp.net Core

I'm trying to create a web application / api using the dot net core.
for the database I choose Microsoft SqlServer, and EntityFrameworkCore as ORM
in previous versions like Asp.Net MVC 5 i used like this:
Install-Package EntityFramework
and i was able to work with Migrations, DbContexts ...
but now with dot net core I saw that I have to install multiple EntityFramework nuget packages, I saw this in multiple tutorials and also in real world.
developers installing the following packages without explaining why:
Microsoft.EntityFrameworkCore
Microsoft.EntityFrameworkCore.Design
Microsoft.EntityFrameworkCore.Relational
Microsoft.EntityFrameworkCore.SqlServer
Microsoft.EntityFrameworkCore.Tools
I googled it so it turns out that I need only these:
Microsoft.EntityFrameworkCore
Microsoft.EntityFrameworkCore.Sqlserver
Microsoft.EntityFrameworkCore.Tools
because the Tools package brings up the Design package from this post : Purpose of package "Microsoft.EntityFrameworkCore.Design"
the question is which packages do we need in dot net core to use entityframeworkcore in our project?
You only need:
Microsoft.EntityFrameworkCore.Sqlserver
(It depends on .Relational)
If you need to run EF Core commands in VS Package Manger console install:
Microsoft.EntityFrameworkCore.Tools
If you want the dotnet CLI EF Core tools run:
dotnet tool install --global dotnet-ef
If you are using .net 5 you need to specify the version that the package is for.
But first you need to open the package manager console. That is from View->Other Windows->Package Manager Console. There you need to make sure that the default project is the project you want to work with.
Like this
Then run these commands in the package manager console:
1.
Install-Package Microsoft.EntityFrameworkCore.Tools -Version 5.0
Install-Package Microsoft.EntityFrameworkCore.SqlServer -Version 5.0
Install-Package Microsoft.EntityFrameworkCore.SqlServer.Design
(for the SqlServer.Design you don't need to specify the version)
(if you are using .net 6 just remove the "-Version 5.0" from the commands)

Is it possible to use Microsoft.Aspnet.Identity.Core with .net 4.0

When I attempt to install Microsoft.Aspnet.Identity.Core version 2.2 with my .net 4.0 project I get the following error:
Could not install package 'Microsoft.AspNet.Identity.Core 2.2.2'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
I understand that it requires .net 4.5+.
Is there an older version of Microsoft.Aspnet.Identity.Core that works with .net 4.0?
More generally, where is the best place to check what version of .net a specific nuget package supports?

Unable to add package Microsoft.Owin.Host.SystemWeb in Asp.net MVC 4.5 version from Nuget package manager

I have created project in asp.net MVC with 4.5 framework in 2015 VS. I am trying to add Microsoft.Owin.Host.SystemWeb this package from nuget package manager but getting error like
Could not install package 'Microsoft.Owin 4.0.0'. You are trying to
install this package into a project that targets
'.NETFramework,Version=v4.5', but the package does not contain any
assembly references or content files that are compatible with that
framework.
Even if I changed framework still getting error and
Microsoft.Owin.Host.SystemWeb latest Version of this package is 4.0.
f you are installing last versions of SignalR you will not be able as it has some dependencies that require .Net4.5, but you can still install an old version of SignalR which uses .Net4.0, like
1.1.3 Install-Package Microsoft.AspNet.SignalR -Version 1.1.3
This is not the case any more, and the 2.x releases require .NET 4.5.
https://github.com/SignalR/SignalR/issues/1723

Newtonsoft version issue with .netcore and Azure

I have Solution like
ABC.Domain (.net standard 2.0)
ABC.Service (.net standard 2.0)
ABC.AzureFunction (.net standard 2.0) v2
ABC.Web (.net core 2.0)
Azure function SDK having a dependency on Newtonsoft 9.0.1 (not able to use upper version), So I used the same version on my ABC.Service project.
I using same ABC.Service reference into ABC.Web project. Now web application not allowing me to install Newtonsoft version 9.0.1.
I tried to uninstall all packages then install Newtonsoft version 9.0.1 first, but now I'm not able to install Microsoft.AspNetCore.All.
Detected package downgrade: Newtonsoft.Json from 10.0.1 to 9.0.1. Reference the package directly from the project to select a different version.
Any suggest??
The latest Microsoft.NET.Sdk.Functions package (version 1.0.13) for v2 depends on Newtonsoft.Json version 10.0.3.
Try changing all references to that version.

Package 'Microsoft.AspNet.SignalR.Core 2.2.2' was restored using '.NETFramework,Version=v4.6.1'

I've installed SignalR.Core and it says the following...
Package 'Microsoft.AspNet.SignalR.Core 2.2.2' was restored using
'.NETFramework,Version=v4.6.1' instead of the project target framework
'.NETCoreApp,Version=v2.0'. This package may not be fully compatible
with your project.
Why would a "Core" version of SignalR be incompatible with .net Core?
That's not the Core version of SignalR, that's the core package of the "classic" version.
SignalR was rewritten from scrach for .NET Core. The first alpha version was released on September 2017 as Microsoft.AspNetCore.SignalR. The latest version is 1.0.0 Alpha 2, released on October.
As the blog post explains, this is a significant redesign. You'll have to experiment with the new SignalR to see how the changes affect your application
You should probably track the Github repository and check this video that explains why SignalR was redesigned
I was having the same problem, I solved installing Microsoft.EntityFrameworkCore before Microsoft.AspNetCore.Identity
PM> Install-Package Microsoft.EntityFrameworkCore -Version 2.2.2
PM> Install-Package Microsoft.AspNetCore.Identity -Version 2.2.0
You can omit -Version to get latest stable version of the Package.

Resources