1. In next Roslyn version `Compilation.MetadataImportOptions` will be public so we can check. 2. We also need to check for `[ReferenceAssembly]` if present we can perhaps try to resolve from the GAC and use refelection. http://source.roslyn.io/#Microsoft.CodeAnalysis/MetadataReader/MetadataImportOptions.cs,05f2bcc4af4b3736 https://github.com/dotnet/roslyn/blob/master/docs/features/refout.md#definition-of-ref-assemblies