Skip to content

Method not found: Microsoft.Data.SqlTypes.SqlVector`1.get_Null()' #3520

@frankbuckley

Description

@frankbuckley

Using version 6.1.0:

// <PackageReference Include="Microsoft.Data.SqlClient" Version="6.1.0" />

using Microsoft.Data.SqlTypes;

Console.WriteLine(SqlVector<float>.Null.IsNull);

Results in:

Unhandled exception. System.MissingMethodException: Method not found: 'Microsoft.Data.SqlTypes.SqlVector`1<!0> Microsoft.Data.SqlTypes.SqlVector`1.get_Null()'.
   at Program.<Main>$(String[] args)

Is it because?...

Here, the return value is not defined as nullable:

/// <include file='../../../../doc/snippets/Microsoft.Data.SqlTypes/SqlVector.xml' path='docs/members[@name="SqlVector"]/Null/*' />
public static SqlVector<T> Null => throw null;

While here, the return value is defined as nullable:

/// <include file='../../../../doc/snippets/Microsoft.Data.SqlTypes/SqlVector.xml' path='docs/members[@name="SqlVector"]/Null/*' />
public static SqlVector<T>? Null => null;

(And this was not updated when SqlVector became a value type.)

Metadata

Metadata

Labels

Area\VectorUse this for issues that are targeted for the Vector feature in the driver.P1Use to label relatively higher severity issues, or issues that impact a large number of customers.Triage Done ✔️Issues that are triaged by dev team and are in investigation.

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions