The problem about package dependency and dlls

I have some code compile into dll using the AssemblyBuilder。And the dll is reference the TextMeshPro
I write the package.json and specify the dependence about the text mesh pro, but when I use this package, it always tips:
Unable to resolve reference 'Unity.TextMeshPro'. Is the assembly missing or incompatible with the current platform?

I write this into the package.json
“dependencies”: {
“com.unity.textmeshpro”: “1.4.0”
},

And the first time the dll loaded, it always has a lot of error report:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: ‘UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null’
at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name, Mono.Cecil.ReaderParameters parameters) [0x00105] in :0

That’s strange. It seems like its working for me. What editor version are you using? I’v attached a project that seems to replicate what you want to do. Is it possible you didn’t add the necessary reference to Text Mesh Pro assemblies when using the AssemblyBuilder?

4549594–422284–assembly builder test.zip (37.9 KB)

@mathieur Maybe you can help me.