02-27-2022 08:49 PM
History:
I create a .dll using .Net Framework (4.5.2) to communicate with Google Auth and Google Drive without any issue from last year till 25/Feb/2022.
Out of sudden, the .dll is not able to use and I Check with C# code if using .net Framework (4.5.2) is not working any more.
It return the error:
Google.GoogleApiException: 'Google.Apis.Requests.RequestError
Invalid Credentials [401]
So I change the .dll with .Net Framework (4.8) and it work fine in the Visual Studio with .exe file.
But When I load it with LabVIEW it prompt back the error :
Error 1172 occurred at Invoke Node System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
Inner Exception: Google.GoogleApiException: Google.Apis.Requests.RequestError
Invalid Credentials [401]
Errors [
Message[Invalid Credentials] Location[Authorization - header] Reason[authError] Domain[global]
]
I try to change CLR Version but not successful. current CLR version is 4.0.30319.42000
Below is the config file I added in the same Labview.exe folder.
LabVIEW.exe.config:
<?xml version ="1.0" encoding="utf-8" ?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.8.4420" sku=".NETFramework,Version=v4.8"/>
</startup>
</configuration>
Tested with LabVIEW 2020 32Bit, LabVIEW 2020 64Bit, LabVIEW 2021 32Bit all not working.
Thanks in advance.
02-28-2022 05:57 PM
May I know how to force LabVIEW to use .Net Framework 4.8?