Getting error while trying to install a Nuget Package
I'm trying to install a pakage and get the following error:
NuGet\Install-Package Microsoft.Windows.WinMD -Version 1.0.210629.2'
NuGet\Install-Package : Could not install package 'Microsoft.Windows.WinMD 1.0.210629.2'. You
are trying to install this package into a project that targets '.NETFramework,Version=v4.7.2',
but the package does not contain any assembly references or content files that are compatible
with that framework.
Please help
Do I understand correctly that you want to write a .net wrapper over a C++?
If so, this is nuget package does not contain dll files. Most likely you need to build the C++ library first and add build result as content in your project.
This nuget package framework is tagged with native.
nuget: Microsoft.Windows.WinMD - Frameworks
The native framework tag is for C++ projects.
DevBlogs: Support for Native Projects
Conclusion: This package can not be consumed or used by any C# project.
However, in the nuget used-by tab of that package is a reference to a C++ github project that uses this package and is described as
C# language projection for the Windows Runtime
You may have a look at that.
Related
I am trying to migrate our WinForms project from .NET Framework to .NET6. We had all dependencies linked from dlls since the solution was designed for SharpDevelop.
I wanted to use advantages of NuGet tool, but I am facing a problem of not compatible package. It throws
NU1202: Package Basler.Pylon.NET.x64 6.2.0.18677 is not compatible with net6.0-windows7.0 (.NETCoreApp,Version=v6.0). Package Basler.Pylon.NET.x64 6.2.0.18677 supports: native (native,Version=v0.0)
Clearing NuGet cache did not helped and my other googling was too general to find anything useful (it's first time I'm facing native NuGet package).
How can I link this package to my .NET6 WinForms library or is this package only for UWP applications?
I'm trying to use the Math.net extension for Visual Studio 2015 with C#.
Unfortunately, after installing the package with
PM> Install-Package MathNet.Numerics -Version 3.20.0
I cannot find it anywhere in the Add References menu. I searched Assemblies->Framework and Assemblies->Extensions and COM, but it's not there
I wouldn't mind the just adding the DLL to my project, but I cannot find the DLL anywhere on https://numerics.mathdotnet.com , all the links take me to the NuGet package manager.
Also, do I need to distribute the MathNet dll with my application if I add it through the package manager, or does it build internally with the application?
Sorry, new to .net library management
I see that when I ran the command line, it added a packages folder to my project folder. Which has a few different versions of the library per .net version. Which I could browse to with Add Reference->Browse->Browse
Is this the correct way about adding a third party library?
I recently started to develop android apps with Xamarin for Visual studio, but every time I want to install a Nuget package for C#.Net I get this error Message:
The package "System.Reflection.Extensions 4.0.0" couldn't be installed. You try to install the package into a project, which refers to MonoAndroid,Version=v7.1", the package doesn't contain assemblyreferences or contentfiles, which are compatible with this framework. Contact the Autor of the nuget package for more information.
Is there any way to modify the nugetpackage to match my needs or do I really have to contact the author of the package?
You can't install the Overwatch.Net package because it only targets .NET 4.5.2 and does not contain libraries for either PCL or Xamarin.Android.
Looking at the code for the library, there is no reason it could not be a PCL, so you have 2 options.
Ask the author of Overwatch.NET to make a PCL or NETStandard version of the library
Do the work yourself and convert it
I made library which is nuget availiable. Let's call it A. Now I would like to create other solution which will use this library and extend it's API by adding fluent api.
My library project type (A) is dll portable with targets: .Net Framework 4.5, Windows 8, ASP.NET Core 1.0
Now, I was trying to create another project in different solution(let's call it B) with same targets (still .dll) However, i can't get manage to make it work. When installing A lib by nuget, it throws:
Could not install package 'System.Collections 4.0.0'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile111', 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.
How to fix it?
I have a problem with NuGet installing the "Xamarin.JOSE.JWT" package. I get the following error:
> Could not install package 'Xamarin.JOSE.JWT 1.0.3'. You are trying to
> install this package into a project that targets
> 'MonoAndroid,Version=v6.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.
Is this a known problem or is there a workaround for this?
Xamarin.JOSE.JWT 1.0.3 does not support Xamarin.Android projects. It only contains assemblies for .NET Framework 4.0.
Your options are:
Find another NuGet package that does support Xamarin.Android projects.
See if you can compile the Xamarin.JOSE.JWT project against Xamarin.Android.
Open an issue on the Xamarin.JOSE.JWT GitHub repository.
Try directly referencing the jose-jwt.dll from the NuGet package and see if it works with an Android project. This may not work if it is using parts of the .NET Framework not supported by Xamarin.Android.
Use the Xamarin.JOSE.JWT NuGet package on the server side and not in the Android project.