'ClickOnce erorr Problem generating manifest. Could not load file or assembly Microsoft.Data.Sqlclient.SNI.x64.dll

I am trying to generate winforms ClickOnce from the application, but I get an error at the manifest stage

Problem generating manifest. Could not load file or assembly Microsoft.Data.Sqlclient.SNI.x64.dll or one of its dependencies. An attempt was made to load a program with an incorrect format ClickOnce generates using MsBuild. I have no idea what might be missing or what format might be wrong

Maybe someone has encountered such a situation and can help me solve it.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source