public WinRTProjectBuilder(string assemblyPath, string targetPath, ILanguage language,
     IDecompilationPreferences preferences, IFileGenerationNotifier notifier,
     IAssemblyInfoService assemblyInfoService, VisualStudioVersion visualStudioVersion = VisualStudioVersion.VS2010,
     ProjectGenerationSettings projectGenerationSettings = null)
     : base(assemblyPath, targetPath, language, null, preferences, notifier, assemblyInfoService, visualStudioVersion, projectGenerationSettings)
 {
     Initialize();
 }
Example #2
0
 public WinRTProjectBuilder(string assemblyPath, string targetPath, ILanguage language,
                            IDecompilationPreferences preferences, IFileGenerationNotifier notifier,
                            IAssemblyInfoService assemblyInfoService, VisualStudioVersion visualStudioVersion = VisualStudioVersion.VS2010,
                            ProjectGenerationSettings projectGenerationSettings = null)
     : base(assemblyPath, targetPath, language, null, preferences, notifier, assemblyInfoService, visualStudioVersion, projectGenerationSettings)
 {
     Initialize();
 }
 public MSBuildProjectBuilder(string assemblyPath, string targetPath, ILanguage language,
                              IFrameworkResolver frameworkResolver, IDecompilationPreferences preferences, IFileGenerationNotifier notifier,
                              IAssemblyInfoService assemblyInfoService, ITargetPlatformResolver targetPlatformResolver, VisualStudioVersion visualStudioVersion = VisualStudioVersion.VS2010,
                              ProjectGenerationSettings projectGenerationSettings = null, IProjectGenerationNotifier projectNotifier = null)
     : base(assemblyPath, targetPath, language, frameworkResolver, preferences, notifier, assemblyInfoService, targetPlatformResolver, visualStudioVersion, projectGenerationSettings, projectNotifier)
 {
     this.projectFileManager = new MsBuildProjectFileManager(this.assembly, this.assemblyInfo, this.visualStudioVersion, this.modulesProjectsGuids, this.language, this.namespaceHierarchyTree);
 }
 public WinRTProjectBuilder(string assemblyPath, AssemblyDefinition assembly,
     Dictionary<ModuleDefinition, Mono.Collections.Generic.Collection<TypeDefinition>> userDefinedTypes,
     Dictionary<ModuleDefinition, Mono.Collections.Generic.Collection<Resource>> resources,
     string targetPath, ILanguage language, IDecompilationPreferences preferences, IAssemblyInfoService assemblyInfoService, VisualStudioVersion visualStudioVersion, ProjectGenerationSettings projectGenerationSettings = null)
     : base(assemblyPath, assembly, userDefinedTypes, resources, targetPath, language, null, preferences, assemblyInfoService, visualStudioVersion, projectGenerationSettings)
 {
     Initialize();
 }
 public NetCoreProjectBuilder(string assemblyPath, AssemblyDefinition assembly,
                              Dictionary <ModuleDefinition, Mono.Collections.Generic.Collection <TypeDefinition> > userDefinedTypes,
                              Dictionary <ModuleDefinition, Mono.Collections.Generic.Collection <Resource> > resources,
                              string targetPath, ILanguage language, IDecompilationPreferences preferences,
                              IAssemblyInfoService assemblyInfoService, VisualStudioVersion visualStudioVersion = VisualStudioVersion.VS2017, ProjectGenerationSettings projectGenerationSettings = null, IProjectGenerationNotifier projectNotifier = null)
     : base(assemblyPath, assembly, userDefinedTypes, resources, targetPath, language, null, preferences, assemblyInfoService, visualStudioVersion, projectGenerationSettings, projectNotifier)
 {
     this.projectFileManager = new NetCoreProjectFileManager(this.assembly, this.assemblyInfo, this.modulesProjectsGuids);
 }
        public WinRTProjectBuilder(string assemblyPath, string targetPath, ILanguage language,
                                   IDecompilationPreferences preferences, IFileGenerationNotifier notifier,
                                   IAssemblyInfoService assemblyInfoService, VisualStudioVersion visualStudioVersion = VisualStudioVersion.VS2010,
                                   ProjectGenerationSettings projectGenerationSettings = null)
            : base(assemblyPath, targetPath, language, null, preferences, notifier, assemblyInfoService, visualStudioVersion, projectGenerationSettings)
        {
            Initialize();

            this.projectFileManager = new WinRTProjectFileManager(this.assembly, this.assemblyInfo, this.language, this.visualStudioVersion, this.namespaceHierarchyTree, this.modulesProjectsGuids, this.projectType, this.IsUWPProject, this.minInstalledUAPVersion, this.maxInstalledUAPVersion);
        }
 public MSBuildProjectBuilder(string assemblyPath, AssemblyDefinition assembly,
                              Dictionary <ModuleDefinition, Mono.Collections.Generic.Collection <TypeDefinition> > userDefinedTypes,
                              Dictionary <ModuleDefinition, Mono.Collections.Generic.Collection <Resource> > resources,
                              string targetPath, ILanguage language, IFrameworkResolver frameworkResolver,
                              IDecompilationPreferences preferences, IAssemblyInfoService assemblyInfoService, ITargetPlatformResolver targetPlatformResolver,
                              VisualStudioVersion visualStudioVersion    = VisualStudioVersion.VS2010, ProjectGenerationSettings projectGenerationSettings = null,
                              IProjectGenerationNotifier projectNotifier = null)
     : base(assemblyPath, assembly, userDefinedTypes, resources, targetPath, language, frameworkResolver, preferences, assemblyInfoService, targetPlatformResolver, visualStudioVersion, projectGenerationSettings, projectNotifier)
 {
     this.projectFileManager = new MsBuildProjectFileManager(this.assembly, this.assemblyInfo, this.visualStudioVersion, this.modulesProjectsGuids, this.language, this.namespaceHierarchyTree);
 }
Example #8
0
        public BaseProjectBuilder(string assemblyPath, AssemblyDefinition assembly,
                                  Dictionary <ModuleDefinition, Mono.Collections.Generic.Collection <TypeDefinition> > userDefinedTypes,
                                  Dictionary <ModuleDefinition, Mono.Collections.Generic.Collection <Resource> > resources,
                                  string targetPath, ILanguage language, IFrameworkResolver frameworkResolver,
                                  IDecompilationPreferences preferences, IAssemblyInfoService assemblyInfoService, ITargetPlatformResolver targetPlatformResolver,
                                  VisualStudioVersion visualStudioVersion    = VisualStudioVersion.VS2010, ProjectGenerationSettings projectGenerationSettings = null,
                                  IProjectGenerationNotifier projectNotifier = null)
        {
            this.assemblyPath            = assemblyPath;
            this.assembly                = assembly;
            this.userDefinedTypes        = userDefinedTypes;
            this.resources               = resources;
            this.TargetPath              = targetPath;
            this.targetDir               = Path.GetDirectoryName(targetPath);
            this.targetPlatformResolver  = targetPlatformResolver;
            this.language                = language;
            this.frameworkResolver       = frameworkResolver;
            this.assemblyInfoService     = assemblyInfoService;
            this.currentAssemblyResolver = assembly.MainModule.AssemblyResolver;

            this.visualStudioVersion       = visualStudioVersion;
            this.projectGenerationSettings = projectGenerationSettings;

            this.decompilationPreferences = preferences;

            this.platform = currentAssemblyResolver.GetTargetPlatform(assembly.MainModule.FilePath, TargetPlatformResolver.Instance);
            this.namespaceHierarchyTree = assembly.BuildNamespaceHierarchyTree();

            filePathsService =
                new DefaultFilePathsService(
                    this.assembly,
                    this.assemblyPath,
                    Path.GetFileName(this.TargetPath),
                    this.UserDefinedTypes,
                    this.Resources,
                    this.namespaceHierarchyTree,
                    this.language,
                    Utilities.GetMaxRelativePathLength(targetPath));
            filePathsService.ExceptionThrown += OnExceptionThrown;

            this.resourcesToPathsMap           = this.filePathsService.GetResourcesToFilePathsMap();
            this.xamlResourcesToPathsMap       = this.filePathsService.GetXamlResourcesToFilePathsMap();
            this.modulesToProjectsFilePathsMap = this.filePathsService.GetModulesToProjectsFilePathsMap();

            this.assemblyInfo         = this.assemblyInfoService.GetAssemblyInfo(this.assembly, this.frameworkResolver, this.targetPlatformResolver);
            this.projectNotifier      = projectNotifier;
            this.modulesProjectsGuids = new Dictionary <ModuleDefinition, Guid>();
        }
        public BaseProjectBuilder(string assemblyPath, string targetPath, ILanguage language,
                                  IFrameworkResolver frameworkResolver, IDecompilationPreferences preferences, IFileGenerationNotifier notifier,
                                  IAssemblyInfoService assemblyInfoService, VisualStudioVersion visualStudioVersion = VisualStudioVersion.VS2010,
                                  ProjectGenerationSettings projectGenerationSettings = null, IProjectGenerationNotifier projectNotifier = null)
        {
            this.assemblyPath = assemblyPath;
            this.TargetPath   = targetPath;
            this.targetDir    = Path.GetDirectoryName(targetPath);
            this.language     = language;

            this.frameworkResolver         = frameworkResolver;
            this.assemblyInfoService       = assemblyInfoService;
            this.decompilationPreferences  = preferences;
            this.visualStudioVersion       = visualStudioVersion;
            this.projectGenerationSettings = projectGenerationSettings;

            this.currentAssemblyResolver = new WeakAssemblyResolver(GlobalAssemblyResolver.CurrentAssemblyPathCache);

            var readerParameters = new ReaderParameters(currentAssemblyResolver);

            assembly = currentAssemblyResolver.LoadAssemblyDefinition(assemblyPath, readerParameters, loadPdb: true);

            this.namespaceHierarchyTree = assembly.BuildNamespaceHierarchyTree();

            filePathsService =
                new DefaultFilePathsService(
                    this.assembly,
                    this.assemblyPath,
                    Path.GetFileName(this.TargetPath),
                    this.UserDefinedTypes,
                    this.Resources,
                    this.namespaceHierarchyTree,
                    this.language,
                    Utilities.GetMaxRelativePathLength(targetPath),
                    this.decompilationPreferences.DecompileDangerousResources);
            filePathsService.ExceptionThrown += OnExceptionThrown;

            this.modulesToProjectsFilePathsMap = this.filePathsService.GetModulesToProjectsFilePathsMap();
            this.fileGeneratedNotifier         = notifier;

            this.resourcesToPathsMap     = this.filePathsService.GetResourcesToFilePathsMap();
            this.xamlResourcesToPathsMap = this.filePathsService.GetXamlResourcesToFilePathsMap();

            this.assemblyInfo         = this.assemblyInfoService.GetAssemblyInfo(this.assembly, this.frameworkResolver);
            this.projectNotifier      = projectNotifier;
            this.modulesProjectsGuids = new Dictionary <ModuleDefinition, Guid>();
        }
        public static ProjectGenerationSettings GetProjectGenerationSettings(string assemblyFilePath, IAssemblyInfoService assemblyInfoService,
            IFrameworkResolver frameworkResolver, VisualStudioVersion visualStudioVersion, ILanguage language)
        {
            AssemblyDefinition assembly = Telerik.JustDecompiler.Decompiler.Utilities.GetAssembly(assemblyFilePath);
            AssemblyInfo assemblyInfo = assemblyInfoService.GetAssemblyInfo(assembly, frameworkResolver);
            foreach (KeyValuePair<ModuleDefinition, FrameworkVersion> pair in assemblyInfo.ModulesFrameworkVersions)
            {
                if (pair.Value == FrameworkVersion.Unknown)
                {
                    return new ProjectGenerationSettings(true, ResourceStrings.GenerateOnlySourceFilesDueToUnknownFrameworkVersion, false);
                }
                else if (pair.Value == FrameworkVersion.WindowsCE || pair.Value == FrameworkVersion.WindowsPhone ||
                    (pair.Value == FrameworkVersion.WinRT && WinRTProjectTypeDetector.GetProjectType(assembly) == WinRTProjectType.Unknown))
                {
                    return new ProjectGenerationSettings(true, ResourceStrings.GenerateOnlySourceFilesDueToNotSupportedProjectType, false);
                }
            }

            string resultErrorMessage;
            if (visualStudioVersion == VisualStudioVersion.VS2010)
            {
                if (!CanBe2010ProjectCreated(assemblyInfo, out resultErrorMessage))
                {
                    return new ProjectGenerationSettings(false, resultErrorMessage);
                }
            }
            else if (visualStudioVersion == VisualStudioVersion.VS2012)
            {
                if (!CanBe2012ProjectCreated(assembly, out resultErrorMessage))
                {
                    return new ProjectGenerationSettings(false, resultErrorMessage);
                }
            }
            else if (visualStudioVersion == VisualStudioVersion.VS2013)
            {
                if (!CanBe2013ProjectCreated(assembly, language, out resultErrorMessage))
                {
                    return new ProjectGenerationSettings(false, resultErrorMessage);
                }
            }

            return new ProjectGenerationSettings(true);
        }
 public XmlValueToXml(IXmlValueToXmlService xmlService, IAssemblyInfoService assemblyInfoService)
 {
     this.xmlService          = xmlService;
     this.assemblyInfoService = assemblyInfoService;
 }
 public ObjectToJsonValue(IAssemblyInfoService assemblyInfoService)
 {
     this.assemblyInfoService = assemblyInfoService;
 }
        public WinRTProjectBuilder(string assemblyPath, AssemblyDefinition assembly,
                                   Dictionary <ModuleDefinition, Mono.Collections.Generic.Collection <TypeDefinition> > userDefinedTypes,
                                   Dictionary <ModuleDefinition, Mono.Collections.Generic.Collection <Resource> > resources,
                                   string targetPath, ILanguage language, IDecompilationPreferences preferences, IAssemblyInfoService assemblyInfoService, VisualStudioVersion visualStudioVersion, ProjectGenerationSettings projectGenerationSettings = null)
            : base(assemblyPath, assembly, userDefinedTypes, resources, targetPath, language, null, preferences, assemblyInfoService, visualStudioVersion, projectGenerationSettings)
        {
            Initialize();

            this.projectFileManager = new WinRTProjectFileManager(this.assembly, this.assemblyInfo, this.language, this.visualStudioVersion, this.namespaceHierarchyTree, this.modulesProjectsGuids, this.projectType, this.IsUWPProject, this.minInstalledUAPVersion, this.maxInstalledUAPVersion);
        }
Example #14
0
 public SystemInfoService(IAssemblyInfoService assemblyInfoService)
 {
     _assemblyInfoService = assemblyInfoService;
 }
Example #15
0
 public WinRTProjectBuilder(string assemblyPath, AssemblyDefinition assembly,
                            Dictionary <ModuleDefinition, Mono.Collections.Generic.Collection <TypeDefinition> > userDefinedTypes,
                            Dictionary <ModuleDefinition, Mono.Collections.Generic.Collection <Resource> > resources,
                            string targetPath, ILanguage language, IDecompilationPreferences preferences, IAssemblyInfoService assemblyInfoService, VisualStudioVersion visualStudioVersion, ProjectGenerationSettings projectGenerationSettings = null)
     : base(assemblyPath, assembly, userDefinedTypes, resources, targetPath, language, null, preferences, assemblyInfoService, visualStudioVersion, projectGenerationSettings)
 {
     Initialize();
 }
 public XmlValueToObject(IAssemblyInfoService assemblyInfoService)
 {
     this.assemblyInfoService = assemblyInfoService;
 }
        public MSBuildProjectBuilder(string assemblyPath, string targetPath, ILanguage language,
            IFrameworkResolver frameworkResolver,IDecompilationPreferences preferences, IFileGenerationNotifier notifier,
            IAssemblyInfoService assemblyInfoService, VisualStudioVersion visualStudioVersion = VisualStudioVersion.VS2010,
			ProjectGenerationSettings projectGenerationSettings = null, IProjectGenerationNotifier projectNotifier = null)
        {
            this.assemblyPath = assemblyPath;
            this.TargetPath = targetPath;
			this.targetDir = Path.GetDirectoryName(targetPath);
            this.language = language;

            this.frameworkResolver = frameworkResolver;
            this.decompilationPreferences = preferences;
            this.assemblyInfoService = assemblyInfoService;
            this.visualStudioVersion = visualStudioVersion;
            this.projectGenerationSettings = projectGenerationSettings;

            this.currentAssemblyResolver = new WeakAssemblyResolver(GlobalAssemblyResolver.CurrentAssemblyPathCache);

            var readerParameters = new ReaderParameters(currentAssemblyResolver);
            assembly = currentAssemblyResolver.LoadAssemblyDefinition(assemblyPath, readerParameters, loadPdb: true);

            platform = currentAssemblyResolver.GetTargetPlatform(assemblyPath);
            namespaceHierarchyTree = assembly.BuildNamespaceHierarchyTree();

            filePathsService =
                new DefaultFilePathsService(
					this.assembly,
                    this.assemblyPath,
					Path.GetFileName(this.TargetPath),
                    this.UserDefinedTypes,
                    this.Resources,
                    namespaceHierarchyTree,
                    this.language,
                    Utilities.GetMaxRelativePathLength(targetPath));

			this.modulesToProjectsFilePathsMap = this.filePathsService.GetModulesToProjectsFilePathsMap();
			this.resourcesToPathsMap = this.filePathsService.GetResourcesToFilePathsMap();
			this.xamlResourcesToPathsMap = this.filePathsService.GetXamlResourcesToFilePathsMap();
            this.fileGeneratedNotifier = notifier;

			this.assemblyInfo = GetAssemblyInfo();
			this.projectNotifier = projectNotifier;
        }
Example #18
0
        public static ProjectGenerationSettings GetProjectGenerationSettings(string assemblyFilePath, IAssemblyInfoService assemblyInfoService,
                                                                             IFrameworkResolver frameworkResolver, VisualStudioVersion visualStudioVersion, ILanguage language, ITargetPlatformResolver targetPlatformResolver)
        {
            AssemblyDefinition assembly       = Telerik.JustDecompiler.Decompiler.Utilities.GetAssembly(assemblyFilePath);
            AssemblyInfo       assemblyInfo   = assemblyInfoService.GetAssemblyInfo(assembly, frameworkResolver, targetPlatformResolver);
            TargetPlatform     targetPlatform = GlobalAssemblyResolver.Instance.GetTargetPlatform(assemblyFilePath, targetPlatformResolver);

            foreach (KeyValuePair <ModuleDefinition, FrameworkVersion> pair in assemblyInfo.ModulesFrameworkVersions)
            {
                if (pair.Value == FrameworkVersion.Unknown)
                {
                    return(new ProjectGenerationSettings(true, ResourceStrings.GenerateOnlySourceFilesDueToUnknownFrameworkVersion, false));
                }
                else if (pair.Value == FrameworkVersion.WindowsCE ||
                         (targetPlatform == TargetPlatform.WindowsPhone && pair.Value == FrameworkVersion.WindowsPhone) ||
                         (targetPlatform == TargetPlatform.WinRT && WinRTProjectTypeDetector.GetProjectType(assembly) == WinRTProjectType.Unknown))
                {
                    return(new ProjectGenerationSettings(true, ResourceStrings.GenerateOnlySourceFilesDueToNotSupportedProjectType, false));
                }
            }

            string resultErrorMessage;

            if (visualStudioVersion == VisualStudioVersion.VS2010)
            {
                if (!CanBe2010ProjectCreated(assemblyInfo, targetPlatform, out resultErrorMessage))
                {
                    return(new ProjectGenerationSettings(false, resultErrorMessage));
                }
            }
            else if (visualStudioVersion == VisualStudioVersion.VS2012)
            {
                if (!CanBe2012ProjectCreated(assembly, out resultErrorMessage))
                {
                    return(new ProjectGenerationSettings(false, resultErrorMessage));
                }
            }
            else
            {
                if (targetPlatform == TargetPlatform.WinRT && language is IVisualBasic &&
                    WinRTProjectTypeDetector.GetProjectType(assembly) == WinRTProjectType.ComponentForUniversal)
                {
                    resultErrorMessage = string.Format(ResourceStrings.CannotCreateProjectForComponentForUniversalInVB, visualStudioVersion.ToFriendlyString());
                    return(new ProjectGenerationSettings(false, resultErrorMessage));
                }

                if (visualStudioVersion == VisualStudioVersion.VS2013)
                {
                    if (!CanBe2013ProjectCreated(assembly, language, out resultErrorMessage))
                    {
                        return(new ProjectGenerationSettings(false, resultErrorMessage));
                    }
                }
            }

            return(new ProjectGenerationSettings(true));
        }
 public NetCoreProjectBuilder(string assemblyPath, string targetPath, ILanguage language, IDecompilationPreferences preferences, IFileGenerationNotifier notifier,
                              IAssemblyInfoService assemblyInfoService, VisualStudioVersion visualStudioVersion = VisualStudioVersion.VS2017, ProjectGenerationSettings projectGenerationSettings = null, IProjectGenerationNotifier projectNotifier = null)
     : base(assemblyPath, targetPath, language, null, preferences, notifier, assemblyInfoService, visualStudioVersion, projectGenerationSettings, projectNotifier)
 {
     this.projectFileManager = new NetCoreProjectFileManager(this.assembly, this.assemblyInfo, this.modulesProjectsGuids);
 }
        public const int MaxPathLength = 259; // 259 + NULL == 260

        public MSBuildProjectBuilder(string assemblyPath, AssemblyDefinition assembly,
            Dictionary<ModuleDefinition, Mono.Collections.Generic.Collection<TypeDefinition>> userDefinedTypes,
 			Dictionary<ModuleDefinition, Mono.Collections.Generic.Collection<Resource>> resources,
			string targetPath, ILanguage language, IFrameworkResolver frameworkResolver,
            IDecompilationPreferences preferences, IAssemblyInfoService assemblyInfoService,
			VisualStudioVersion visualStudioVersion = VisualStudioVersion.VS2010, ProjectGenerationSettings projectGenerationSettings = null,
			IProjectGenerationNotifier projectNotifier = null)
        {
            this.assemblyPath = assemblyPath;
            this.assembly = assembly;
            this.userDefinedTypes = userDefinedTypes;
			this.resources = resources;
            this.TargetPath = targetPath;
			this.targetDir = Path.GetDirectoryName(targetPath);
            this.language = language;
            this.frameworkResolver = frameworkResolver;
            this.assemblyInfoService = assemblyInfoService;
            this.visualStudioVersion = visualStudioVersion;
            this.projectGenerationSettings = projectGenerationSettings;

            this.currentAssemblyResolver = assembly.MainModule.AssemblyResolver;
			this.decompilationPreferences = preferences;

            platform = currentAssemblyResolver.GetTargetPlatform(assembly.MainModule.FilePath);
            namespaceHierarchyTree = assembly.BuildNamespaceHierarchyTree();

            filePathsService =
                new DefaultFilePathsService(
					this.assembly,
                    this.assemblyPath,
					Path.GetFileName(this.TargetPath),
                    this.UserDefinedTypes,
                    this.Resources,
                    namespaceHierarchyTree,
                    this.language,
                    Utilities.GetMaxRelativePathLength(targetPath));

			this.modulesToProjectsFilePathsMap = this.filePathsService.GetModulesToProjectsFilePathsMap();
			this.resourcesToPathsMap = this.filePathsService.GetResourcesToFilePathsMap();
			this.xamlResourcesToPathsMap = this.filePathsService.GetXamlResourcesToFilePathsMap();

			this.assemblyInfo = GetAssemblyInfo();
			this.projectNotifier = projectNotifier;
        }
        public static ProjectGenerationSettings GetProjectGenerationSettings(string assemblyFilePath, IAssemblyInfoService assemblyInfoService,
                                                                             IFrameworkResolver frameworkResolver, VisualStudioVersion visualStudioVersion, ILanguage language)
        {
            AssemblyDefinition assembly     = Telerik.JustDecompiler.Decompiler.Utilities.GetAssembly(assemblyFilePath);
            AssemblyInfo       assemblyInfo = assemblyInfoService.GetAssemblyInfo(assembly, frameworkResolver);

            foreach (KeyValuePair <ModuleDefinition, FrameworkVersion> pair in assemblyInfo.ModulesFrameworkVersions)
            {
                if (pair.Value == FrameworkVersion.Unknown)
                {
                    return(new ProjectGenerationSettings(true, ResourceStrings.GenerateOnlySourceFilesDueToUnknownFrameworkVersion, false));
                }
                else if (pair.Value == FrameworkVersion.WindowsCE || pair.Value == FrameworkVersion.WindowsPhone ||
                         (pair.Value == FrameworkVersion.WinRT && WinRTProjectTypeDetector.GetProjectType(assembly) == WinRTProjectType.Unknown))
                {
                    return(new ProjectGenerationSettings(true, ResourceStrings.GenerateOnlySourceFilesDueToNotSupportedProjectType, false));
                }
            }

            string resultErrorMessage;

            if (visualStudioVersion == VisualStudioVersion.VS2010)
            {
                if (!CanBe2010ProjectCreated(assemblyInfo, out resultErrorMessage))
                {
                    return(new ProjectGenerationSettings(false, resultErrorMessage));
                }
            }
            else if (visualStudioVersion == VisualStudioVersion.VS2012)
            {
                if (!CanBe2012ProjectCreated(assembly, out resultErrorMessage))
                {
                    return(new ProjectGenerationSettings(false, resultErrorMessage));
                }
            }
            else if (visualStudioVersion == VisualStudioVersion.VS2013)
            {
                if (!CanBe2013ProjectCreated(assembly, language, out resultErrorMessage))
                {
                    return(new ProjectGenerationSettings(false, resultErrorMessage));
                }
            }

            return(new ProjectGenerationSettings(true));
        }