Visual Studio 2019 C++ project with NuGet package installing failds - c++

I want to import some package through NuGet into my C++ Visual Studio 2019 project(of couse, packages available in C++).
All packakges I tried to install is from "nuget.org" source.
But all package installation fails with following reasons:
Install-Package : Could not install package 'SomePackage'.
You are trying to install this package into a project that targets
'native,Version=v0.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 think it occurs because I trying to install NuGet package in C++ project.
What is "native,Version=v0.0" means? How can I fix it?

Related

C++ nuGet packages in vscode

How do I install nuGet packages for c++ in vs code? I've tried installing allegro library using nuGet plugin, but is seems to only work for c# projects, and says that it didn't find any .csproj files in the project.

Cannot install packages using Nuget

I am unable to install any packages to my Unity UWP project ouput in visual stuio using nuget(VS solution is in C++).
I get
"Could not install package 'xxxxx'. You are trying to install this package into a project that targets 'native,Version=v0.0', but the package does not contain any assembly references or content files that are compatible with that framework."
I have unity version 2019 and Visual studio 2019 installed.
so the sentence "but the package does not contain any assembly references or content files that are compatible with that framework" says all...

Nuget packages doubled

I have a visual studio solution with several projects all specifing their own packages.config.
If I run "nuget restore blablabla.sln", I get e.g. grpc.core\1.11.0 in my packages folder.
If I let Visual Studio do this I will get grpc.core\1.11.0 and Grpc.Core.1.11.0 in my packages folder both with the same contents!?
Why is that?
BR,
Daniel
Nuget packages doubled
According to your description, you should have more than two package resources in your Visual Studio with same nuget package grpc.core\Grpc.Core (Ignore case). As we know, nuget is not case sensitive when searching and restoring packages. So:
Double check the packages grpc.core\1.11.0 and Grpc.Core.1.11.0 are the same except capitalization.
Clean up your \packages folder before restoring the nuget from
Visual Studio.
If you confirm the above, please check if your package feed have the nuget package grpc.core\1.11.0. You can remove it, since it have the same contents as package Grpc.Core.1.11.0 in the default package source nuegt.org.
Hope this helps.

Visual Studio 2017 Migrating packages.config to PackageReference

When migrating packages.config with Newtonsoft.Json package to the PackageReference csproj format I get compatibility issue:
Newtonsoft.Json v10.0.3, install.ps1 script will be ignored when the package is installed after the migration.
Is this anything which could break something? The project compiles well in local VS 2017. But TeamCity Visual Studio (sln) build fails with the error namespace name Newtonsoft could not be found. Can this be related somehow to the migration issue?
Per #Peska's comment I've checked the NuGet version which was used for the Restore build step in TeamCity. The used NuGet version was 3.4.3.
Once this was changed to Nuget 4.3.0 the package restore worked as expected and the following "Build Solution (sln)" step then succeeded.

Visual Studio could not install packages

I installed the first time Visual Studio Community on my Mac an created a Project for an Android App and after I tried to add the "Tweedsharp" package I've got this error. I tried to add other packages or a new or an otherwise Projekt, but I couldn't add any package.
Could not install package 'TweetSharp-Unofficial 2.3.1.2'. You are trying to install this package into a project that targets 'MonoAndroid,Version=v7.1', 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.