Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ public bool EmitContainerPropertyAttribute()
if (reference.SourceProject == null)
{
// Assembly reference (For project reference, SourceProject != null)
if (reference.Name.Equals("Microsoft.OData.Client", StringComparison.Ordinal) && string.Compare(reference.Version, "7.6.4.0", StringComparison.Ordinal) > 0)
if (reference.Name.Equals("Microsoft.OData.Client", StringComparison.Ordinal))
{
return true;
return Version.Parse(reference.Version) > Version.Parse("7.6.4.0");
Copy link
Copy Markdown
Contributor

@ElizabethOkerio ElizabethOkerio Mar 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have a parsing exception here? or reference.Version will always be in the required format?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Especially because the reference is for a library we maintain, plus this statement is in within the block

if (reference.Name.Equals("Microsoft.OData.Client", StringComparison.Ordinal))

I think this should be safe.
In addition, we currently update the Microsoft.OData.Client reference manually.

}
}
}
Expand Down