Summary
The required Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll is not copied to my project's bin directory
Details
I have the following
- a class project called abc.settings with vitually no references other than the standard one.
- a class project called abc.settings.extensions.keyvault which is an extension library for abc.settings and has the KeyVault nuget plus the Microsoft.IndentityModels.Clients.ActiveDirectory nuget which is a dependency for KeyVault (amongst others)
- a project called abc.login which has a reference to both abc.settings and abc.extensions.keyvault
The abc.login application builds ok with no errors but when I run it, I get a runtime aggregate exception which boils down to unable to load module Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll
When I look in the bin folder of abc.settings.extensions.keyvault, Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll is present along with Microsoft.IdentityModel.Clients.ActiveDirectory.dll as expected.
When I look in abc.login\bin\x64, I see a Microsoft.IdentityModel.Clients.ActiveDirectory.dll but no Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll
Things I have tried
- Ensure copy local is true for both these files
- Ensured Specific Version is set the same for both these dlls (it is and they were set to true)
- Reinstalled the nugets
- installed the ADAL nuget in the abc.login project - this causes the application to work...but it should have been copied because abc.extensions.keyvaul was referenced.
- I checked out This SO but I can't understand how this is half working (one dll gets copied, the other does not). That post implies this referenced project dll's references should never work.
Any suggestions on why or where else to investigate?
Thank you.