duplicate type in assembly bug

I was getting an error about a duplicate type in the assembly, and I think I was able to fix it by adding a lock( ) { } to the code for generate wrapper...I'm guessing it was a multiple threading issue