"Failed to Load file orProgramSet "com. sqlserverdal" or one of its dependencies. The system cannot find the specified file. Is unable to find the Assembly, mainly because it does not understand its running mechanism, in fact, if
Assembly. Load (PATH). createinstance (classname );
Write
Assembly. Load ("com. sqlserverdal. dll"). createinstance (classname );
This is not a namespace, but a DLL file in the bin. The default DLL file generated by the project sqlserverdal is sqlserverdal. dll, so the above error occurs. You only need to change the Assembly name to "com. sqlserverdal" in the project attribute.
========================================================== ========================================================== ==============================
Error Description: failed to Load file, assembly "sqlserverdal", or one of its dependencies. The file does not exist.
Cause: 1. The understanding of dynamic reflection is unclear when using hierarchical design ideas.
2. Failed to load the Assembly due to a bug in the development tool.
Solution:
1. Reflection programming requires that the compiled. dll file (that is, the DLL file exists) be included in the bin folder of the website, and the name of the class library must be consistent with that of the class library before compilation. It can be called "add reference.
2. check the properties of the project (Class Library) on the website, and check whether the default namespace is consistent with the Assembly name and the DLL file name in the bin folder. Otherwise, the file or assembly cannot be loaded, so modify the properties of the project. Name consistency.
3. It is recommended that you write the system name + project name when creating a class library during programming to effectively avoid generating bugs. That is, systemname. model or systemname. idal. Eg: BBS. model. It can be called: Name integrity.
Most important: the path dll must be in the bin directory of the website Web