private void AddProjectToSolutionIfNeeded(FromNuGetToProjectTransformation fromNuGetToProjectTransformation)
 {
     if (fromNuGetToProjectTransformation.SelectedMode == NuGetToProjectMode.ProjectPath)
     {
         if (!string.IsNullOrEmpty(fromNuGetToProjectTransformation.ToProjectPath) && File.Exists(fromNuGetToProjectTransformation.ToProjectPath))
         {
             var project = Application.Solution.AddFromFile(fromNuGetToProjectTransformation.ToProjectPath);
             var myProject = new ProjectModel((VSProject)project.Object);
             fromNuGetToProjectTransformation.ToProject = myProject;
         }
         else
             MessageBox.Show("The project '" + fromNuGetToProjectTransformation.ToProjectPath + "' could not be found. (ignored)", "Project not found", MessageBoxButton.OK, MessageBoxImage.Stop);
     }
 }
Exemple #2
0
 /// <summary>Adds a project reference to the project. </summary>
 /// <param name="project">The project to add. </param>
 public void AddProjectReference(ProjectModel project)
 {
     _vsProject.References.AddProject(project._vsProject.Project);
 }
 /// <summary>Adds a project reference to the project. </summary>
 /// <param name="project">The project to add. </param>
 public void AddProjectReference(ProjectModel project)
 {
     _vsProject.References.AddProject(project._vsProject.Project);
 }