Bad IL format. The format of the file is invalid. Can't publish project

I have disabled the validation before publishing, but it did not resolve as well

I tried changing the version of the packages back and forth and deleting the nuget folder completely, still the same errors.

With Database 1.6.1 and EmguCV 1.0.0

With Database 1.7.1 and EmguCV 1.1.0

I don’t know what else I can make to be able to publish this bot. It runs from studio, but I would need to publish it to the orchestrator.