Using .netstandard2.0 NuGet with .NetFramework4.6.2 - .net-core

I have a project in .NetStandard2.0 and this has to be used as a nuget in 2 projects, one in .NetCore2.2 and the other in .NetFramework4.6.2. Installing the nuget in .NetCore2.2 had no issues, but when I'm trying to install this package in the other project, I'm getting the following error -
Could not install package 'packageName'. You are trying to install
this package into a project that targets
'.NETFramework,Version=v4.6.2', 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 also tried changing the target framework of this project from .NetFramework4.6.2 to .NetFramework4.7.2, but I'm getting the same error. Am I doing something wrong?

I had opened the Framework project in Visual Studio 2015 and this was causing the issue on trying to install the nuget package which was created in .NetStandard2.0. It was successfully installed when I tried it in Visual Studio 2017.

Related

How to update dotnet core package

A vulnerability found in my project is below
Then tried to find this version of the project. but I didn't find any package directly using in my dotnet core project.
Then I found some dependency package in obj/project.assets.json
something like below
Then I again searched Microsoft.AspNetCore.Authentication.Core in visual studio manager. But not found any package.
My question is how to update this package in my dotnet core project ?

Visual Studio Warnings with CosmosDB nuget package install

I am doing a Xamarin Forms project and installed CosmosDB nu get package but I am getting the following warnings that I am unable to get rid of
Severity Code Description Project File Line Suppression State
Warning NU1701 Package 'Microsoft.Azure.CosmosDB.Table 1.1.0' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework 'UAP,Version=v10.0.16299'. This package may not be fully compatible with your project.
Warning NU1701 Package 'Microsoft.Azure.CosmosDB.Table 1.1.0' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project. NWMPosNG C:\Users\MattDouhan\source\repos\NWMPosNG\NWMPosNG\NWMPosNG\NWMPosNG.csproj
How do I resolve this?
Microsoft.Azure.CosmosDB.Table currently only targets .NETFramework 4.5, but .NET Standard support will be out soon.

Stripe.net nuget package doesn't recognize json.net 9.0.1

I'm trying to install the Stripe.net 6.12.0 nuget package in my project. It has a dependency on the Json.NET 9.0.1 nuget package which I have installed, but when I go to install stripe.net, visual studio gives me the error message: "Stripe.NET already has a dependency defined for"Newtonsoft.Json'. What do I have to do to install Stripe.NET?
Was not obvious from the error message, but the solution was simply to upgrade Nuget. Was using 2.8.xxx and upgraded to the latest which is 2.12.xxx. Restarted. Fixed the problem.

issues for NuGet after migrating a c# project

i'm trying to migrate a project into my visual studio 2012.
On the Manage NuGet Packages, I have this issue:
"Some NuGet Packages are missing from this solution. Click to restore from your online package sources"... but when i click on the restore button, it appears this issue:
"an error occurred while trying to restore packages: Unable to find version '4.1.0-alpha-121112' of package 'Microsoft.AspNet.WebApi'. "
i'm using .NET Framework 4
How can i solve?
Thanks in advance....
The problem is that version '4.1.0-alpha-121112' of package Microsoft.AspNet.WebApi does not exist on NuGet.org. It is not available on MyGet from the ASP.NET Web Stack Nightly package source either. So NuGet cannot restore it since it is no longer available.
Looking at Symbol Source it looks like this NuGet package was at one point available from the ASP.NET Web Stack Nightly package source on MyGet but it no longer seems to be available. I suspect they have deleted the old packages from that MyGet package source.
Unless you can find the original NuGet package, you will either have to manually remove the NuGet package reference, by editing the project file and packages.config file, and reinstall a version that exists.
1) Make sure you upgrade to the latest NuGet.
2) Make sure you're doing package restore "The Right Way" http://blog.davidebbo.com/2014/01/the-right-way-to-restore-nuget-packages.html
That should resolve the issue.
if still this ain't solve you can see this Rightway to migrate

Not able to Install Unity in VS2010

I am trying to install Unity from Nugget in VS2010 and receiving following error:
Could not install package 'Unity 3.5.1404.0'. 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.
Any Idea what could be Wrong?
I understand this package is not for VS2010 but for VS2012 or later. What is the way to get this package for VS2010 or VS2008?
Cheers
The problem is that Unity 3.5 requires .NET 4.5.

Resources