The project structure is as follows:
The service project calls two datamodel. the method in SQL, two datamodel. the SQL method uses version 3.1.0.0 XXX. DLL, the Service Project always calls a datamodel. the method in the SQL statement is normal. The following error is reported: XXX cannot be loaded. DLL... generally, the version numbers of the two DLL files are the same, but the actual version number conflicts.
According.
In desperation, I checked various datamodel. XXX in the bin directory of SQL. DLL file properties, found that the two versions of the DLL file size is different, so although the two DLL versions are the same, it is actually different versions. I will call two projects to the same XXX. dll. The problem is solved.
Conclusion: We recommend that you put the public assembly used by the same solution or project [A software project, not a project in Visual Studio] in a folder, all references use the DLL in this folder, so that this version number conflict will not occur.