Ok…I found the mistake!
I was using a separate class file with the same namespace to collect some method. In some of these methods I was accepting Revit.DB.Elements as input.
Now I just put this class on a separate namespace and I did some code adjustment and is fine!