void ProjectTargetFrameworkChanged (object sender, ProjectTargetFrameworkChangedEventArgs e)
		{
			if (e.Project.HasPackagesConfig ()) {
				var runner = new PackageCompatibilityRunner (e.Project);
				runner.Run ();
			}
		}
예제 #2
0
 void ProjectTargetFrameworkChanged(object sender, ProjectTargetFrameworkChangedEventArgs e)
 {
     if (e.Project.HasPackages())
     {
         var runner = new PackageCompatibilityRunner(e.Project);
         runner.Run();
     }
 }
        /// <summary>
        /// This event is fired after the project is saved. Runs a restore if the project was
        /// not reloaded.
        /// </summary>
        void ProjectTargetFrameworkChanged(object sender, ProjectTargetFrameworkChangedEventArgs e)
        {
            if (e.IsReload || e.Project.Name != Project.Name)
            {
                // Ignore. A restore will occur on reload elsewhere.
                return;
            }

            // Need to re-evaluate before restoring to ensure the implicit package references are correct after
            // the target framework has changed.
            RestorePackagesInProjectHandler.Run(Project, restoreTransitiveProjectReferences: true, reevaluateBeforeRestore: true);
        }
 void ProjectTargetFrameworkChanged(object sender, ProjectTargetFrameworkChangedEventArgs e)
 {
     if (e.Project.HasPackagesConfig())
     {
         var runner = new PackageCompatibilityRunner(e.Project);
         runner.Run();
     }
     else if (DotNetCoreNuGetProject.CanCreate(e.Project.DotNetProject))
     {
         // Ignore - .NET Core project target framework changes are handled
         // by the DotNetCoreProjectExtension.
     }
     else if (PackageReferenceNuGetProject.CanCreate(e.Project.DotNetProject))
     {
         RestorePackagesInProjectHandler.Run(e.Project.DotNetProject);
     }
 }