コード例 #1
0
        private string GetAssemblyPath(IAssemblySymbol assembly)
        {
            MetadataReference reference = compilation.GetMetadataReference(assembly);

            if (reference is PortableExecutableReference peReference)
            {
                return(peReference.FilePath);
            }
            return(null);
        }