static IAssemblyModel SafelyCreateAssemblyModelFromFile(string fileName)
        {
            var modelFactory = SD.GetRequiredService <IModelFactory>();

            try {
                return(SD.AssemblyParserService.GetAssemblyModel(new FileName(fileName), true));
            } catch (Exception) {
                // Special AssemblyModel for unresolved file references
                string fakedAssemblyName = Path.GetFileName(fileName);
                IEntityModelContext      unresolvedContext = new UnresolvedAssemblyEntityModelContext(fakedAssemblyName, fakedAssemblyName, fileName);
                IUpdateableAssemblyModel unresolvedModel   = modelFactory.CreateAssemblyModel(unresolvedContext);
                unresolvedModel.AssemblyName     = unresolvedContext.AssemblyName;
                unresolvedModel.FullAssemblyName = unresolvedContext.FullAssemblyName;

                return(unresolvedModel);
            }
        }
        static IAssemblyModel SafelyCreateAssemblyModelFromFile(string fileName)
        {
            var modelFactory = SD.GetRequiredService<IModelFactory>();
            try {
                return SD.AssemblyParserService.GetAssemblyModel(new FileName(fileName), true);
            } catch (Exception) {
                // Special AssemblyModel for unresolved file references
                string fakedAssemblyName = Path.GetFileName(fileName);
                IEntityModelContext unresolvedContext = new UnresolvedAssemblyEntityModelContext(fakedAssemblyName, fakedAssemblyName, fileName);
                IUpdateableAssemblyModel unresolvedModel = modelFactory.CreateAssemblyModel(unresolvedContext);
                unresolvedModel.AssemblyName = unresolvedContext.AssemblyName;
                unresolvedModel.FullAssemblyName = unresolvedContext.FullAssemblyName;

                return unresolvedModel;
            }
        }