简体   繁体   English

对Microsoft.IdentityModel.Clients.ActiveDirectory 3.14.2的硬依赖性

[英]Hard dependency on Microsoft.IdentityModel.Clients.ActiveDirectory 3.14.2

I am trying to use Azure Managed Service Identity with Azure functions and KeyVault. 我正在尝试将Azure托管服务身份与Azure函数和KeyVault结合使用。 I want to be able to get secrets from the vault and also use ADAL to authenticate with a certificate to get access to SharePoint Online. 我希望能够从Vault中获取机密,并且还可以使用ADAL来通过证书进行身份验证以访问SharePoint Online。 I'm developing locally with Visual Studio 2017. 我正在使用Visual Studio 2017在本地进行开发。

I want to use 3.19.8 of Microsoft.IdentityModel.Clients.ActiveDirectory and the nuget package for Microsoft.Azure.Services.AppAuthentication states a dependency of Microsoft.IdentityModel.Clients.ActiveDirectory (>= 3.14.2). 我想使用Microsoft.IdentityModel.Clients.ActiveDirectory的3.19.8和Microsoft.Azure.Services.AppAuthentication的nuget包声明Microsoft.IdentityModel.Clients.ActiveDirectory(> = 3.14.2)的依赖项。 However, it seems to be hard linked to 3.14.2. 但是,它似乎很难与3.14.2链接。 I get an exception 'Could not load file or assembly 'Microsoft.IdentityModel.Clients.ActiveDirectory, Version=3.14.2.11' if I try to access the vault. 如果尝试访问库,则会收到异常“无法加载文件或程序集” Microsoft.IdentityModel.Clients.ActiveDirectory,Version = 3.14.2.11”。

If I try to use 3.14.2 then I get exceptions with authenticating with the cert saying method isn't found. 如果我尝试使用3.14.2,则无法找到使用certsay方法进行身份验证的异常。

So I am wondering if the description in Nuget is incorrect or if it is possible to use a later version of Microsoft.IdentityModel.Clients.ActiveDirectory in an Azure Function which doesn't seem to allow Redirection of assembly versions. 所以我想知道Nuget中的描述是否不正确,或者是否可以在似乎不允许重定向程序集版本的Azure函数中使用更高版本的Microsoft.IdentityModel.Clients.ActiveDirectory。

Thanks 谢谢

Older versions of NuGet / Visual Studio use project hint paths to reference the packaged dependencies. NuGet / Visual Studio的较旧版本使用项目提示路径来引用打包的依赖项。 Upgrading with newer versions of NuGet does not seem to work, as the old hint path is not updated. 用新版本的NuGet升级似乎不起作用,因为旧的提示路径未更新。

Please edit your csproj manually to remove these. 请手动编辑您的csproj以将其删除。

This was very odd. 这很奇怪。 After finding that I could get it to work on my PC at home, I re-entered the credentials in Visual Studio and removed and re-added the Microsoft.Azure.Services.AppAuthentication package and it started working on my work PC as well. 在发现我可以在家里的PC上使用它之后,我在Visual Studio中重新输入了凭据,然后删除并重新添加了Microsoft.Azure.Services.AppAuthentication程序包,它也开始在我的工作PC上运行。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Microsoft.IdentityModel.Clients.ActiveDirectory v3.17.0 和 appid/appsecret - Microsoft.IdentityModel.Clients.ActiveDirectory v3.17.0 and appid/appsecret 无法加载文件或程序集“Microsoft.IdentityModel.Clients.ActiveDirectory” - Could not load file or assembly 'Microsoft.IdentityModel.Clients.ActiveDirectory' 缺少程序集引用Microsoft.IdentityModel.Clients.ActiveDirectory - Missing assembly reference Microsoft.IdentityModel.Clients.ActiveDirectory 如何确保Microsoft.IdentityModel.Clients.ActiveDirectory库返回刷新令牌? - How do I make sure that a refresh token is returned by Microsoft.IdentityModel.Clients.ActiveDirectory library? 调用 GetAzureADAppOnlyAuthenticatedContext 时无法加载文件或程序集“Microsoft.IdentityModel.Clients.ActiveDirectory” - Could not load file or assembly 'Microsoft.IdentityModel.Clients.ActiveDirectory when calling GetAzureADAppOnlyAuthenticatedContext 将 Microsoft.IdentityModel.Clients.ActiveDirectory 升级到 5.2.9 后 AcquireTokenByAuthorizationCodeAsync 抛出错误 - AcquireTokenByAuthorizationCodeAsync throws error after upgrading Microsoft.IdentityModel.Clients.ActiveDirectory to 5.2.9 Microsoft.IdentityModel.Clients.ActiveDirectory.Platform不存在 - Microsoft.IdentityModel.Clients.ActiveDirectory.Platform not present Microsoft.IdentityModel.Clients.ActiveDirectory.UserCredential是否不包含2个参数? - Microsoft.IdentityModel.Clients.ActiveDirectory.UserCredential does not take 2 parameters? 无法加载文件或程序集“ Microsoft.IdentityModel.Clients.ActiveDirectory.Platform” - Could not load file or assembly 'Microsoft.IdentityModel.Clients.ActiveDirectory.Platform' 如何安装 Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms? - How do I install Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM