Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi
I am facing the exception while creating the PowerBiClient Object.
Could not load file or assembly 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.
By looking the solution in one of the forum , i have added the redirecting dependecy aw well. but still facing this issue.
Task<AuthenticationResult> tokenAccessKey = Program.GetToken();
var tokenCredentials = new TokenCredentials(tokenAccessKey.Result.AccessToken, tokenAccessKey.Result.AccessTokenType);
using (var client = new PowerBIClient(new Uri(ApiUrl), tokenCredentials))
{
}
Questions: is these below making this problem
1. What should be my ApiUrl ? ex: "https://app.powerbi.com/"
2. my tokenCredentials object's Client ID and Tenent Id returning null. event though the tokenAccessKey is valid
Solved! Go to Solution.
Hi,
I faced this issue becasue of version conflict of Newtonsoft.Json between "6.0.0.0" and "7.0.0.0"
"Could not load file or assembly 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified."
Download 7.0.0.0 from nuget and add in webconfig. started working.
Thanks,
@bhagya wrote:
Hi
I am facing the exception while creating the PowerBiClient Object.
Could not load file or assembly 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.
By looking the solution in one of the forum , i have added the redirecting dependecy aw well. but still facing this issue.
Task<AuthenticationResult> tokenAccessKey = Program.GetToken();
var tokenCredentials = new TokenCredentials(tokenAccessKey.Result.AccessToken, tokenAccessKey.Result.AccessTokenType);using (var client = new PowerBIClient(new Uri(ApiUrl), tokenCredentials))
{
}
Questions: is these below making this problem
1. What should be my ApiUrl ? ex: "https://app.powerbi.com/"
2. my tokenCredentials object's Client ID and Tenent Id returning null. event though the tokenAccessKey is valid
Yes, the ApiUrl is "https://api.powerbi.com/".
As to the null values, the probable reason is the not well installed Newtonsoft.Json. Try to uninstall and reinstall it following this thread.
Hi,
I faced this issue becasue of version conflict of Newtonsoft.Json between "6.0.0.0" and "7.0.0.0"
"Could not load file or assembly 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified."
Download 7.0.0.0 from nuget and add in webconfig. started working.
Thanks,
Hi, @bhagya
I know it has been a while, but I am getting this error when running the powershell cmdlet
Could not load file or assembly 'Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxxx' or one of its dependencies. The system cannot
find the file specified.
At line:1 char:1
+ get-PowerBIWorkspace -All
You mentioned that you Download 7.0.0.0 from nuget and add in webconfig.
How did you do that?
Sorry if it sounds silly, but I am a newbie
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
2 | |
2 | |
1 | |
1 |
User | Count |
---|---|
22 | |
2 | |
2 | |
2 | |
2 |