Home > front end >  Having trouble while Installing a Nuget package(WIndows.winMD)
Having trouble while Installing a Nuget package(WIndows.winMD)

Time:01-26

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

CodePudding user response:

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.

CodePudding user response:

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.

  •  Tags:  
  • c#
  • Related