C# CompileAssemblyFromSource, add referenced assemblies it needs?
问题 I have the CompileAssemblyFromSource working for code that only references assemblies that my program (that compiles it) uses. It works beautifully. However, if I need to compile code that has a "using blah;" statement, it won't be able to find blah and say it is missing a resource. So if it is "System.Windows.Forms", and I say "compilerparams.ReferencedAssemblies.Add("System.Windows.Forms.dll")", it works. So I can parse the code file and get all the "using" parameters, but how do I know