【发布时间】:2016-10-18 06:36:39
【问题描述】:
问题的根源:
我们希望访问Dynamics CRM Web API,这样做的步骤之一是获取App registered。为此,我们需要redirectURI,而该URI 又需要
WebAuthenticationBroker。我们正在为WebAuthenticationBroker做所有这些 Nuget 斗争
安装Nuget包时Microsoft.Preview.WindowsAzure.ActiveDirectory.Authentication
在 Visual Studio Premium 2013 Update 5 中,我们收到以下错误:
在 Visual Studio Enterprise 2015 Update 3 中,我们收到以下错误:
无法安装包“
Microsoft.Preview.WindowsAzure.ActiveDirectory.Authentication 0.6.1”。您正在尝试将此包安装到以“.NETFramework,Version=v4.5”为目标的项目中,但该包不包含任何与该框架兼容的程序集引用或内容文件。如需更多信息,请联系包作者。
顺便说一句,.NET Core 已安装:
但未显示在 Visual Studio(任一版本)中:
尝试使用以下指南解决问题:
- The project is created from scratch.
- Mapped with versions v3 to v4.6.1
- Created a folder
Microsoft.Preview.WindowsAzure.ActiveDirectory.Authentication.0.6.1inside packages folder of the project - 尝试使用sample project 使用
WebAuthenticationBroker,发现它需要Windows 8.1 才能在Visual Studio 中工作
【问题讨论】:
-
我认为这个例外是不言自明的。 Nuget 包本身与 .Net Framework 4.5 不兼容。到该软件包发布时,无论如何都没有 4.5 :) 如果您可能必须使用该软件包,请尝试使用较低版本的目标框架?
标签: javascript c# .net visual-studio nuget