Why do DLLs have to comply with .NET 2?

I just wanted to ask what the difference for DLLs in comparison to Unity native compiled code is?
I just starting creating a DLL with one extension method in it and Unity did not like it, saying reflections could not make anything out of the method. Extension methods work within Unity however.

How to tell what’s working and what is not? Or is somehow cross compiled under the hood?

Unity doesn’t use Microsoft’s .NET implementation, but an older version of Mono which covers .NET 2 - 3.5ish.

Edit: For your dll make sure you’ve set it to compile to .NET 2.0 (or 3.5) in the project settings.

You mean from code? It just compiles them?

For your dll makes sure you’ve set it to compile to .NET 2.0 (or 3.5) in the project settings.