[ERROR] [UiPath.Studio] [52] Bad IL format. The format of the file ‘….nuget\packages\UiPath.database.activities\1.7.1\lib/net5.0-windows7.0/runtimes/win-x64/native/Microsoft.Data.SqlClient.SNI.dll’ is invalid.
1 Like
Welcome to the community
Is this stopping you from running?
After latest upgrade we see this error some times as bad IL format but the bot would still run normally…please let us know if that is not the case
Cheers
Hi @liuyankun,
In this case, it seems that the Microsoft.Data.SqlClient.SNI.dll
file that is being used by the UiPath.Database.Activities package is not compatible with the .NET runtime version that UiPath is running on.
Here are a few steps you can try to resolve this issue:
- Ensure that you are using the latest version of UiPath.Database.Activities package. You can do this by checking the package manager in UiPath Studio and updating the package if a newer version is available.
- Check the .NET runtime version that UiPath is running on. You can do this by going to the Project Settings in UiPath Studio and checking the Target Framework setting. Ensure that the version of .NET runtime used by UiPath.Database.Activities is compatible with this setting.
- Try manually installing the
Microsoft.Data.SqlClient.SNI.dll
file that is compatible with the .NET runtime version used by UiPath. You can download this file from the Microsoft website and replace the existing file in the package directory. - If none of the above steps work, try reinstalling UiPath and all the packages that you are using in your project.
Please update the .Net Framework on your machine to the latest version available and test your activity.
Hope that should help.
Cheers.