void OnConvertProjectToMSBuild35ButtonClick(object sender, EventArgs e)
 {
     using (ConvertToMSBuild35Dialog dlg = new ConvertToMSBuild35Dialog(project.Language + " newversion")) {
         if (dlg.ShowDialog() == DialogResult.OK)
         {
             if (dlg.ConvertAllProjects)
             {
                 foreach (IProject p in ProjectService.OpenSolution.Projects)
                 {
                     MSBuildBasedProject msbp = p as MSBuildBasedProject;
                     if (msbp != null)
                     {
                         msbp.ConvertToMSBuild35(dlg.ChangeTargetFramework);
                     }
                 }
             }
             else
             {
                 project.ConvertToMSBuild35(dlg.ChangeTargetFramework);
             }
             if (project.MinimumSolutionVersion == Solution.SolutionVersionVS2005)
             {
                 throw new InvalidOperationException("Project did not convert to MSBuild 3.5");
             }
             ProjectService.SaveSolution();
             InitTargetFramework();
         }
     }
 }
		void OnConvertProjectToMSBuild35ButtonClick(object sender, EventArgs e)
		{
			using (ConvertToMSBuild35Dialog dlg = new ConvertToMSBuild35Dialog(project.Language + " newversion")) {
				if (dlg.ShowDialog() == DialogResult.OK) {
					if (dlg.ConvertAllProjects) {
						foreach (IProject p in ProjectService.OpenSolution.Projects) {
							MSBuildBasedProject msbp = p as MSBuildBasedProject;
							if (msbp != null)
								msbp.ConvertToMSBuild35(dlg.ChangeTargetFramework);
						}
					} else {
						project.ConvertToMSBuild35(dlg.ChangeTargetFramework);
					}
					if (project.MinimumSolutionVersion == Solution.SolutionVersionVS2005)
						throw new InvalidOperationException("Project did not convert to MSBuild 3.5");
					ProjectService.SaveSolution();
					InitTargetFramework();
				}
			}
		}