简体   繁体   中英

Trying to Install Package that Targets .NETFramework V4.6.1 WPF

I have seen read how many people have faced this problem. Specifically I'm trying to install the package: Microsoft.Toolkit.Wpf.UI.Controls.Webview although as the title states it:

Could not install package 'Microsoft.Toolkit.Wpf.UI.Controls.WebView 5.0.1'.
You are trying to install this package into a project that targets 
.NETFramework,Version=v4.6.1', but the package does not contain any assembly 
references or content files that are compatible with that framework.

The problem I face is that the two solutions across all the similar posts don't seem to solve the problem for me. I have cleared the Nuget cache, which didn't resolve the issue and the second solution, which states renaming the Package .net folder to the current targeted framework is impossible as I cannot install it at all.

Is there something I'm missing?

You need to upgrade the target framework of your project to .NET Framework 4.6.2 or later to be able to consume and use the Microsoft.Toolkit.Wpf.UI.Controls.WebView package.

You do this under Project->Properties->Application->Target Framework in Visual Studio:

在此处输入图片说明

The package targets .NET v4.6.2. You cant install it in a lower framework project.

Simply download the package and open it in 7Zip or any zip extractor to see the package's target framework version. Open \\lib\\ directory.

在此处输入图片说明

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