I am trying to use Roslyn to analyze a solution file and programmatically add an assembly reference for each project in the solution.
I tried using the following code snippet to do the same:
//The name of the DLL is customLib.dll var reference = MetadataReference.CreateAssemblyReference("customLib"); project = project.AddMetadataReference(reference);
However, when creating a MetadataReference, a FileNotFoundException is thrown.
So my question is: How to specify the path where Roslyn should check the specified DLL ?
Thanks.
jithinpt
source share