Azure / azure-functions-host

The host/runtime that powers Azure Functions
https://functions.azure.com
MIT License
1.94k stars 441 forks source link

PowerBIClient causes Could not load file or assembly 'System.Net.Http.WebRequest' #3613

Closed JohnReeson closed 6 years ago

JohnReeson commented 6 years ago

Repro steps

  1. Create a v2 http trigger locally Azure Functions Core Tools (2.1.725) Function Runtime Version: 2.0.12134.0

  2. Get credential and new a PowerBIClient to get related info. Packages installed

  3. Trigger function, error happens at this line var client = new PowerBIClient(new Uri(apiUrl), tokenCredentials).

    System.Private.CoreLib: Exception while executing function: Function2. Microsoft.Rest.ClientRuntime: 
    Could not load file or assembly 'System.Net.Http.WebRequest, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. 
    The system cannot find the file specified. System.Private.CoreLib: Could not load the specified file.
JohnReeson commented 6 years ago

Close as it's external problem, Microsoft.PowerBI.Api sdk doesn't support .netcore or .netstandard.