Exemplo n.º 1
0
        protected void AddNugetPostUpdateCommandsToProjects(Version xrmPackageVersion, Dictionary <string, ProjectInfo> projects)
        {
            var mapper = new NuGetMapper(NuGetPath, xrmPackageVersion);

            foreach (var project in projects.Values.Where(p => p.Type != ProjectInfo.ProjectType.SharedProj))
            {
                project.AddNugetPostUpdateCommands(mapper,
                                                   Path.Combine(TemplateDirectory, project.Key, "packages.config"),
                                                   Path.Combine(OutputBaseDirectory, project.Name, "packages.config"),
                                                   NugetContentInstallerPath,
                                                   OutputBaseDirectory);
            }
        }
Exemplo n.º 2
0
        public void AddNugetPostUpdateCommands(NuGetMapper nuGetMapper, string templatePackagesPath, string packagesPath, string nugetContentInstallerPath, string solutionDirectory)
        {
            if (!File.Exists(templatePackagesPath))
            {
                return;
            }

            nuGetMapper.AddUpdateCommands(PostUpdateCommands, templatePackagesPath, packagesPath);
            var packages = File.ReadAllText(templatePackagesPath);

            if (packages.Contains("DLaB.Xrm.Source") || packages.Contains("DLaB.Xrm.Common.Source"))
            {
                PostSolutionRestoreCommands.Add(new ProcessExecutorInfo(nugetContentInstallerPath, $@"""{solutionDirectory}"" ""{Path.Combine(solutionDirectory, Name, Name + "." + GetProjectPostfix())}"""));
            }
        }