Found the answer, so to those that end in the same situation
the line
let t = ProvidedTypeDefinition(thisAssembly,
ns,
name,
baseType = Some typeof<obj>)
where the nested type is defined should be without assembly and namespace
let t = ProvidedTypeDefinition(name,baseType = Some typeof<obj>)