2
Answers

Filenot find execption on loading MySql.Data.dll from a windows service

Photo of priya melur

priya melur

15y
3.3k
1

I have a  windows service which refer the private assembly mySql.Data.dll.  I  added the dll in bin folder  and add referene to the same. but on execution I got an error that unable to load the assembly MySql.Data.dll or one of its dependencies.
Then I tried to install the mySql.Data.dll in GAC.It also failed because the dll doesnt have a strong name.
I have created a windows application with the same dll. There I dont have any problem. it works fine with the same dll.
Please help

Answers (2)

0
Photo of Roei Bar
NA 7.8k 0 15y
uninstall the Service and reinstall it, the exception is due to an error in registration to services on registry
0
Photo of jinge
NA 2.4k 23.5k 15y

Please make sure if you install the service right. here's similar problem.