private void InstallWebApiDependencies(Project proj, IVsPackageMetadata[] packs, IVsPackageInstaller installer,
                                               IVsPackageInstallerServices installerServices)
        {
            NugetInstallerHelper.InstallPackageIfNeeded(proj, packs, installer, NewtonsoftJsonPackageId,
                                                        NewtonsoftJsonPackageVersion, Settings.Default.NugetExternalPackagesSource);
            NugetInstallerHelper.InstallPackageIfNeeded(proj, packs, installer, EdgePackageId, EdgePackageVersion,
                                                        Settings.Default.NugetExternalPackagesSource);
            NugetInstallerHelper.InstallPackageIfNeeded(proj, packs, installer, "System.ComponentModel.Annotations",
                                                        "4.0.0", Settings.Default.NugetExternalPackagesSource);

            // RAML.Parser
            if (!installerServices.IsPackageInstalled(proj, "RAML.Parser.Model"))
            {
                installer.InstallPackage(NugetPackagesSource, proj, "RAML.Parser.Model", "1.0.7",
                                         false);
            }

            // AMF.Api.Core
            if (!installerServices.IsPackageInstalled(proj, RamlApiCorePackageId))
            {
                //installer.InstallPackage(nugetPackagesSource, proj, ramlApiCorePackageId, ramlApiCorePackageVersion, false);
                installer.InstallPackage(NugetPackagesSource, proj, RamlApiCorePackageId, RamlApiCorePackageVersion,
                                         false);
            }

            // AMF.WebApiExplorer
            if (!installerServices.IsPackageInstalled(proj, RamlWebApiExplorerPackageId))
            {
                installer.InstallPackage(NugetPackagesSource, proj, RamlWebApiExplorerPackageId,
                                         RamlWebApiExplorerPackageVersion, false);
            }
        }
        public override void InstallDependencies(Project proj)
        {
            var componentModel    = (IComponentModel)ServiceProvider.GetService(typeof(SComponentModel));
            var installerServices = componentModel.GetService <IVsPackageInstallerServices>();
            var installer         = componentModel.GetService <IVsPackageInstaller>();
            var packs             = installerServices.GetInstalledPackages(proj).ToArray();

            // MSTests package
            NugetInstallerHelper.InstallPackageIfNeeded(proj, packs, installer, "MSTest.TestFramework", "1.3.2", Settings.Default.NugetExternalPackagesSource);

            //// Microsoft.AspNet.WebApi.Core
            var webApiPackage = "Microsoft.AspNet.WebApi.Core";
            var webApiVersion = "5.2.4";

            if (!installerServices.IsPackageInstalled(proj, webApiPackage))
            {
                installer.InstallPackage(nugetPackagesSource, proj, webApiPackage, webApiVersion, false);
            }

            //// AMF.Core.APICore
            //var ramlApiCorePackageId = Settings.Default.RAMLApiCorePackageId;
            //var ramlApiCorePackageVersion = Settings.Default.RAMLApiCorePackageVersion;
            //if (!installerServices.IsPackageInstalled(proj, ramlApiCorePackageId))
            //{
            //    installer.InstallPackage(nugetPackagesSource, proj, ramlApiCorePackageId, webApiVersion, false);
            //}
        }
示例#3
0
        protected override void InstallNugetDependencies(Project proj)
        {
            var componentModel = (IComponentModel)ServiceProvider.GetService(typeof(SComponentModel));

            Assumes.Present(componentModel);
            var installerServices = componentModel.GetService <IVsPackageInstallerServices>();
            var installer         = componentModel.GetService <IVsPackageInstaller>();
            var packs             = installerServices.GetInstalledPackages(proj).ToArray();

            NugetInstallerHelper.InstallPackageIfNeeded(proj, packs, installer, NewtonsoftJsonPackageId, "11.0.2", RAML.Tools.Properties.Settings.Default.NugetExternalPackagesSource);
            NugetInstallerHelper.InstallPackageIfNeeded(proj, packs, installer, "Microsoft.AspNet.WebApi.Client", "5.2.6", RAML.Tools.Properties.Settings.Default.NugetExternalPackagesSource);
            NugetInstallerHelper.InstallPackageIfNeeded(proj, packs, installer, "System.Xml.XmlSerializer", "4.3.0", RAML.Tools.Properties.Settings.Default.NugetExternalPackagesSource);
            NugetInstallerHelper.InstallPackageIfNeeded(proj, packs, installer, "System.Runtime.Serialization.Xml", "4.3.0", RAML.Tools.Properties.Settings.Default.NugetExternalPackagesSource);
            NugetInstallerHelper.InstallPackageIfNeeded(proj, packs, installer, "System.ComponentModel.Annotations", "4.5.0", RAML.Tools.Properties.Settings.Default.NugetExternalPackagesSource);
            NugetInstallerHelper.InstallPackageIfNeeded(proj, packs, installer, "System.Runtime.Serialization.Primitives", "4.3.0", RAML.Tools.Properties.Settings.Default.NugetExternalPackagesSource);

            // RAML.NetCore.APICore
            var ramlNetCoreApiCorePackageId      = RAML.Tools.Properties.Settings.Default.AMFNetCoreApiCorePackageId;
            var ramlNetCoreApiCorePackageVersion = RAML.Tools.Properties.Settings.Default.AMFNetCoreApiCorePackageVersion;

            if (!installerServices.IsPackageInstalled(proj, ramlNetCoreApiCorePackageId))
            {
                installer.InstallPackage(nugetPackagesSource, proj, ramlNetCoreApiCorePackageId, ramlNetCoreApiCorePackageVersion, false);
            }
        }
示例#4
0
        private void InstallNetCoreDependencies(Project proj, IVsPackageMetadata[] packs, IVsPackageInstaller installer, IVsPackageInstallerServices installerServices)
        {
            var version = VisualStudioAutomationHelper.GetTargetFrameworkVersion(proj);

            // RAML.Parser.Expressions
            if (!installerServices.IsPackageInstalled(proj, AspNetCoreStaticFilesPackageId))
            {
                if (version.StartsWith("1"))
                {
                    NugetInstallerHelper.InstallPackageIfNeeded(proj, packs, installer, AspNetCoreStaticFilesPackageId, "1.0.0",
                                                                RAML.Tools.Properties.Settings.Default.NugetExternalPackagesSource);
                }
            }

            // RAML.Parser.Expressions
            if (!installerServices.IsPackageInstalled(proj, RamlParserExpressionsPackageId))
            {
                installer.InstallPackage(NugetPackagesSource, proj, RamlParserExpressionsPackageId, RamlParserExpressionsPackageVersion, false);
            }

            // RAML.NetCoreAPIExplorer
            if (!installerServices.IsPackageInstalled(proj, RamlNetCoreApiExplorerPackageId))
            {
                installer.InstallPackage(NugetPackagesSource, proj, RamlNetCoreApiExplorerPackageId, RamlNetCoreApiExplorerPackageVersion, false);
            }
        }
        protected void InstallNugetDependencies(Project proj, string packageVersion)
        {
            var componentModel = (IComponentModel)ServiceProvider.GetService(typeof(SComponentModel));

            Assumes.Present(componentModel);
            var installerServices = componentModel.GetService <IVsPackageInstallerServices>();
            var installer         = componentModel.GetService <IVsPackageInstaller>();

            var packs = installerServices.GetInstalledPackages(proj).ToArray();

            // RAML.Api.Core dependencies
            NugetInstallerHelper.InstallPackageIfNeeded(proj, packs, installer, newtonsoftJsonPackageId, packageVersion, RAML.Tools.Properties.Settings.Default.NugetExternalPackagesSource);
        }
        protected void InstallNugetDependencies(Project proj, string packageVersion)
        {
            var componentModel    = (IComponentModel)ServiceProvider.GetService(typeof(SComponentModel));
            var installerServices = componentModel.GetService <IVsPackageInstallerServices>();
            var installer         = componentModel.GetService <IVsPackageInstaller>();

            var packs = installerServices.GetInstalledPackages(proj).ToArray();

            // AMF.Api.Core dependencies
            NugetInstallerHelper.InstallPackageIfNeeded(proj, packs, installer, newtonsoftJsonPackageId, packageVersion, Settings.Default.NugetExternalPackagesSource);

            // System.Xml.XmlSerializer 4.0.11-beta-23516
            // NugetInstallerHelper.InstallPackageIfNeeded(proj, packs, installer, "System.Xml.XmlSerializer", "4.0.11-beta-23516");
        }
        private void InstallNetCoreDependencies(Project proj, IVsPackageMetadata[] packs, IVsPackageInstaller installer, IVsPackageInstallerServices installerServices)
        {
            NugetInstallerHelper.InstallPackageIfNeeded(proj, packs, installer, "Microsoft.AspNetCore.StaticFiles",
                                                        "1.0.0", Settings.Default.NugetExternalPackagesSource);

            // RAML.Parser.Expressions
            if (!installerServices.IsPackageInstalled(proj, RamlParserExpressionsPackageId))
            {
                installer.InstallPackage(NugetPackagesSource, proj, RamlParserExpressionsPackageId, RamlParserExpressionsPackageVersion, false);
            }

            // AMF.NetCoreApiExplorer
            if (!installerServices.IsPackageInstalled(proj, RamlNetCoreApiExplorerPackageId))
            {
                installer.InstallPackage(NugetPackagesSource, proj, RamlNetCoreApiExplorerPackageId, RamlNetCoreApiExplorerPackageVersion, false);
            }
        }
示例#8
0
        protected void InstallDependencies(Project proj, string packageVersion)
        {
            var componentModel    = (IComponentModel)ServiceProvider.GetService(typeof(SComponentModel));
            var installerServices = componentModel.GetService <IVsPackageInstallerServices>();
            var installer         = componentModel.GetService <IVsPackageInstaller>();

            var packs = installerServices.GetInstalledPackages(proj).ToArray();

            // AMF.Api.Core dependencies
            NugetInstallerHelper.InstallPackageIfNeeded(proj, packs, installer, microsoftNetHttpPackageId, microsoftNetHttpPackageVersion, Settings.Default.NugetExternalPackagesSource);

            InstallNugetDependencies(proj, packageVersion);

            // AMF.Api.Core
            if (!installerServices.IsPackageInstalled(proj, ramlApiCorePackageId))
            {
                installer.InstallPackage(nugetPackagesSource, proj, ramlApiCorePackageId, ramlApiCorePackageVersion, false);
            }
        }
        protected override void InstallNugetDependencies(Project proj)
        {
            var componentModel    = (IComponentModel)ServiceProvider.GetService(typeof(SComponentModel));
            var installerServices = componentModel.GetService <IVsPackageInstallerServices>();
            var installer         = componentModel.GetService <IVsPackageInstaller>();
            var packs             = installerServices.GetInstalledPackages(proj).ToArray();

            NugetInstallerHelper.InstallPackageIfNeeded(proj, packs, installer, microsoftNetHttpPackageId, microsoftNetHttpPackageVersion, AMF.Tools.Properties.Settings.Default.NugetExternalPackagesSource);
            NugetInstallerHelper.InstallPackageIfNeeded(proj, packs, installer, NewtonsoftJsonPackageId, newtonsoftJsonPackageVersion, Settings.Default.NugetExternalPackagesSource);
            NugetInstallerHelper.InstallPackageIfNeeded(proj, packs, installer, webApiCorePackageId, webApiCorePackageVersion, Settings.Default.NugetExternalPackagesSource);
            NugetInstallerHelper.InstallPackageIfNeeded(proj, packs, installer, "System.ComponentModel.Annotations", "4.5.0", Settings.Default.NugetExternalPackagesSource);
            NugetInstallerHelper.InstallPackageIfNeeded(proj, packs, installer, "System.Runtime.Serialization.Primitives", "4.3.0", Settings.Default.NugetExternalPackagesSource);


            // RAML.Api.Core
            if (!installerServices.IsPackageInstalled(proj, ramlApiCorePackageId))
            {
                installer.InstallPackage(nugetPackagesSource, proj, ramlApiCorePackageId, ramlApiCorePackageVersion, false);
            }
        }
示例#10
0
        public override void InstallDependencies(Project proj)
        {
            var componentModel    = (IComponentModel)ServiceProvider.GetService(typeof(SComponentModel));
            var installerServices = componentModel.GetService <IVsPackageInstallerServices>();
            var installer         = componentModel.GetService <IVsPackageInstaller>();

            var packs = installerServices.GetInstalledPackages(proj).ToArray();

            // MSTests package
            NugetInstallerHelper.InstallPackageIfNeeded(proj, packs, installer, "MSTest.TestFramework", "1.4.0", Settings.Default.NugetExternalPackagesSource);

            // InstallNugetDependencies(proj, newtonsoftJsonForCorePackageVersion);

            //// AMF.NetCore.APICore
            //var ramlNetCoreApiCorePackageId = Settings.Default.AMFNetCoreApiCorePackageId;
            //var ramlNetCoreApiCorePackageVersion = Settings.Default.AMFNetCoreApiCorePackageVersion;
            //if (!installerServices.IsPackageInstalled(proj, ramlNetCoreApiCorePackageId))
            //{
            //    installer.InstallPackage(nugetPackagesSource, proj, ramlNetCoreApiCorePackageId, ramlNetCoreApiCorePackageVersion, false);
            //}
        }