Skip to content

Commit fc24a26

Browse files
committed
IsCPSCapabilityComplaint -> IsCPSCapabilityCompliant
1 parent 775aefa commit fc24a26

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

src/NuGet.Clients/NuGet.PackageManagement.VisualStudio/Projects/CpsPackageReferenceProjectProvider.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,15 @@ public async Task<NuGetProject> TryCreateNuGetProjectAsync(
7575
}
7676

7777
// Check if the project is not CPS capable or if it is CPS capable that its opt'd in PackageReferences
78-
if (!VsHierarchyUtility.IsCPSCapabilityComplaint(hierarchy) &&
78+
if (!VsHierarchyUtility.IsCPSCapabilityCompliant(hierarchy) ||
7979
!VsHierarchyUtility.IsProjectCapabilityCompliant(hierarchy))
8080
{
8181
return null;
8282
}
8383

8484
var buildProperties = vsProject.BuildProperties;
8585

86-
// read MSBuild property RestoreProjectStyle, TargetFramework, and TargetFrameworks
86+
// read MSBuild property RestoreProjectStyle
8787
var restoreProjectStyle = await buildProperties.GetPropertyValueAsync(ProjectBuildProperties.RestoreProjectStyle);
8888

8989
// check for RestoreProjectStyle property is set and if not set to PackageReference then return false

src/NuGet.Clients/NuGet.PackageManagement.VisualStudio/Projects/NuGetProjectFactory.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public async Task<NuGetProject> TryCreateNuGetProjectAsync(
7070
await _threadingService.JoinableTaskFactory.SwitchToMainThreadAsync();
7171

7272
if (vsProjectAdapter.VsHierarchy != null &&
73-
VsHierarchyUtility.IsCPSCapabilityComplaint(vsProjectAdapter.VsHierarchy))
73+
VsHierarchyUtility.IsCPSCapabilityCompliant(vsProjectAdapter.VsHierarchy))
7474
{
7575
// Lazy load the CPS enabled JoinableTaskFactory for the UI.
7676
NuGetUIThreadHelper.SetJoinableTaskFactoryFromService(ProjectServiceAccessor.Value as IProjectServiceAccessor);
@@ -130,7 +130,7 @@ public async Task<TProject> CreateNuGetProjectAsync<TProject>(
130130
}
131131

132132
if (vsProjectAdapter.VsHierarchy != null &&
133-
VsHierarchyUtility.IsCPSCapabilityComplaint(vsProjectAdapter.VsHierarchy))
133+
VsHierarchyUtility.IsCPSCapabilityCompliant(vsProjectAdapter.VsHierarchy))
134134
{
135135
// Lazy load the CPS enabled JoinableTaskFactory for the UI.
136136
NuGetUIThreadHelper.SetJoinableTaskFactoryFromService(ProjectServiceAccessor.Value as IProjectServiceAccessor);

src/NuGet.Clients/NuGet.VisualStudio.Common/VsHierarchyUtility.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public static string[] GetProjectTypeGuids(IVsHierarchy hierarchy, string defaul
113113
/// Check for CPS capability in IVsHierarchy. All CPS projects will have CPS capability except VisualC projects.
114114
/// So checking for VisualC explicitly with a OR flag.
115115
/// </summary>
116-
public static bool IsCPSCapabilityComplaint(IVsHierarchy hierarchy)
116+
public static bool IsCPSCapabilityCompliant(IVsHierarchy hierarchy)
117117
{
118118
ThreadHelper.ThrowIfNotOnUIThread();
119119

src/NuGet.Clients/NuGet.VisualStudio.Implementation/Extensibility/VsPackageInstaller.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ private void RunJTFWithCorrectContext(Project project, Func<Task> asyncTask)
7171

7272
var vsHierarchy = VsHierarchyUtility.ToVsHierarchy(project);
7373
if (vsHierarchy != null &&
74-
VsHierarchyUtility.IsCPSCapabilityComplaint(vsHierarchy))
74+
VsHierarchyUtility.IsCPSCapabilityCompliant(vsHierarchy))
7575
{
7676
// Lazy load the CPS enabled JoinableTaskFactory for the UI.
7777
NuGetUIThreadHelper.SetJoinableTaskFactoryFromService(ProjectServiceAccessor.Value as IProjectServiceAccessor);

test/NuGet.Clients.Tests/NuGet.PackageManagement.VisualStudio.Test/Services/NuGetProjectManagerServiceTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ await SimpleTestPackageUtility.CreateFolderFeedV3Async(
144144
nuGetProjectServices.SetupGet(x => x.ScriptService)
145145
.Returns(Mock.Of<IProjectScriptHostService>());
146146

147-
var project = new NetCorePackageReferenceProject(
147+
var project = new CpsPackageReferenceProject(
148148
projectName: projectName,
149149
projectUniqueName: projectFullPath,
150150
projectFullPath: projectFullPath,

0 commit comments

Comments
 (0)