简体   繁体   中英

Having trouble while Installing a Nuget package(WIndows.winMD)

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM