Skip to content

Commit 778422a

Browse files
authored
fix compile errors in NuGet.CommandLine project that broke the builds locally (#5710)
1 parent 4daaef9 commit 778422a

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src/NuGet.Clients/NuGet.CommandLine/Commands/ProjectFactory.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,7 @@ private PackageDependency CreateDependencyFromProject(dynamic project, Dictionar
761761

762762
projectFactory.InitializeProperties(builder);
763763

764+
#pragma warning disable CS0612 // Type or member is obsolete
764765
if (!projectFactory.ProcessJsonFile(builder, project.DirectoryPath, null))
765766
{
766767
projectFactory.ProcessNuspec(builder, null);
@@ -772,6 +773,7 @@ private PackageDependency CreateDependencyFromProject(dynamic project, Dictionar
772773
string.Format(CultureInfo.CurrentCulture, NuGetResources.ProjectJsonPack_Deprecated, builder.Id),
773774
NuGetLogCode.NU5126));
774775
}
776+
#pragma warning restore CS0612 // Type or member is obsolete
775777

776778
VersionRange versionRange = null;
777779
if (dependencies.ContainsKey(builder.Id))

src/NuGet.Clients/NuGet.CommandLine/Common/Solution.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ private void LoadSolutionWithMsbuild14(Assembly msbuildAssembly, string solution
135135

136136
try
137137
{
138-
var projectShouldBuild = !isSolutionFilter || projectShouldBuildMethod.Invoke(solutionFile, new object[] { project.RelativePath });
138+
var projectShouldBuild = !isSolutionFilter || (bool)projectShouldBuildMethod.Invoke(solutionFile, new object[] { project.RelativePath });
139139
if (projectShouldBuild)
140140
{
141141
var relativePath = project.RelativePath.Replace('\\', Path.DirectorySeparatorChar);

0 commit comments

Comments
 (0)