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); } }
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())}""")); } }