I have an Azure function that is responsible for connecting to an Azure AD and retrieving some Azure AD information.
When I use the .Expand()
property on the .Users
, I receive the following compilation error:
activeDirectoryClient.Users.Expand(x => x.MemberOf).ExecuteAsync().Result;
(38,17): error CS0012: The type 'Expression<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Linq.Expressions
I have added the namespace correctly, and also tried to add it in the project.json :
{
"frameworks": {
"net46":{
"dependencies": {
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.13.5",
"Microsoft.Azure.ActiveDirectory.GraphClient": "2.1.0",
"System.Linq": "4.0.0",
"System.Linq.Expressions": "4.0.0"
}
}
}
}
Are there known issues with Linq.Expressions
in Azure Functions solution using C#?
There are no issues with Linq.Expressions in Azure Functions.
Working example of HttpTriggerCSSharp using Linq.Expression:
project.json
run.csx