Skip to content

Commit

Permalink
fix compile errors in NuGet.CommandLine project that broke the builds…
Browse files Browse the repository at this point in the history
… locally (#5710)
  • Loading branch information
kartheekp-ms authored and Nigusu-Allehu committed Mar 29, 2024
1 parent 1819d4e commit c27cbfc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,7 @@ private PackageDependency CreateDependencyFromProject(dynamic project, Dictionar

projectFactory.InitializeProperties(builder);

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

VersionRange versionRange = null;
if (dependencies.ContainsKey(builder.Id))
Expand Down
2 changes: 1 addition & 1 deletion src/NuGet.Clients/NuGet.CommandLine/Common/Solution.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ private void LoadSolutionWithMsbuild14(Assembly msbuildAssembly, string solution

try
{
var projectShouldBuild = !isSolutionFilter || projectShouldBuildMethod.Invoke(solutionFile, new object[] { project.RelativePath });
var projectShouldBuild = !isSolutionFilter || (bool)projectShouldBuildMethod.Invoke(solutionFile, new object[] { project.RelativePath });
if (projectShouldBuild)
{
var relativePath = project.RelativePath.Replace('\\', Path.DirectorySeparatorChar);
Expand Down

0 comments on commit c27cbfc

Please sign in to comment.