Compilers require a reference assembly. Which should never be stored in the GAC. The GAC is only there to help the CLR find the proper version of whatever reference assembly you used at compile time. Compilers therefore never look in the GAC for a reference assembly. Nor can they possibly do so, they don't know what version to look for.
So this went wrong when you added the assembly to the GAC. The build system now no longer copies the DLL to the output directory since it can tell that this is no longer necessary. So your CodeDom code can no longer work since the reference assembly is missing and the compiler can no longer find it.
Don't use the GAC on your dev machine. Only, if ever, on the machine on which you install your program. In your particular case that should be never since you rely on the assembly you compile with to be identical to the assembly that gets loaded when you run the code.