While trying to compile some code out of .txt files (at run time), I have code which references Assemblies for the code that is being compiled.
It has been working fine for months, but I’ve recently had to add System.Speech.dll as one of the referenced assemblies, and now I am getting an error when it tries to compile the code in any of the text files.
Here’s the error:
metadata file ‘System.Speech.dll’ could not be found
System.Speech.dll is in the references of the project as well, so if that could be the issue, it isn’t. Also, all the other referenced dll’s are completely fine, no errors for them at all.
Here’s the section of code: (If you need more, please comment)
CompilerParameters options = new CompilerParameters();
options.ReferencedAssemblies.Add("System.dll");
options.ReferencedAssemblies.Add("System.Core.dll");
options.ReferencedAssemblies.Add("System.Drawing.dll");
options.ReferencedAssemblies.Add("System.Speech.dll");
How can i remove this error? Thanks!
I was able to reproduce your error and solve it by doing the following change:
You need to change it to your location of course.