bool PackageNeedsReinstall(IDotNetProject project, IPackage package, FrameworkName packageTargetFramework)
        {
            var compatibility = new PackageCompatibility(project, package, packageTargetFramework);

            compatibility.CheckCompatibility();
            compatibilityReport.Add(compatibility);

            return(compatibility.ShouldReinstallPackage);
        }
예제 #2
0
        bool PackageNeedsReinstall(IPackageCompatibilityNuGetProject nugetProject, PackageReference packageReference)
        {
            var    targetFramework = nugetProject.TargetFramework;
            string packageFileName = nugetProject.GetInstalledPackageFilePath(packageReference.PackageIdentity);

            if (!FileExists(packageFileName))
            {
                return(false);
            }

            var compatibility = CreatePackageCompatibility(targetFramework, packageReference, packageFileName);

            compatibility.CheckCompatibility();
            compatibilityReport.Add(compatibility);

            return(compatibility.ShouldReinstallPackage);
        }