Bad IL format error when publishing project: "Microsoft.Data.SqlClient.SNI.dll" file is invalid

Hello UiPath Community,

I am encountering an issue when attempting to publish my project, and I’m hoping someone can help me troubleshoot.

The error message I’m receiving is as follows:

Bad IL format. The format of the file 'C:\Users\XXXXX\.nuget\packages\uipath.database.activities\1.9.0\lib/net6.0-windows7.0/runtimes/win-x64/native/Microsoft.Data.SqlClient.SNI.dll' is invalid.

I’ve tried the following steps:

  • Clearing the NuGet cache.
  • Restarting UiPath Studio.
  • Verifying that all packages are up to date.

Despite these efforts, the error persists. Has anyone encountered a similar issue? Any suggestions on how to resolve the Bad IL format error related to the Microsoft.Data.SqlClient.SNI.dll file?

Thank you in advance for your help!

Best regards,

@Jose_Corbalan

if using datatbase activities then Try to update the ProviderName from System.Data.SqlClient is changed to Microsoft.Data.SqlClient

if not it should be creating any issue anyways as it is a .net change issue

check this

cheers

Thanks for your answer. We are using database activities to connect to oracle database. Will the update work as well for this?

Regards

@Jose_Corbalan

the fix is specifically for database only…if you check the link

cheers