Skip to content

Minor bug in SdkResolver.GetVSInstallPath() causes NullReferenceException instead of the appropriate error message #94

@MuleaneEve

Description

@MuleaneEve

It took me hours to troubleshoot this one: I didn't have the VC++ component installed, and was getting an unhelpful NullReferenceException.

The solution to this problem is:
The line var state = instance2.GetState(); must be moved inside the if (fetched > 0) { ... } block.

var state = instance2.GetState();
if (fetched > 0)
{
if ((state & InstanceState.Registered) == InstanceState.Registered)

By the way, the error message could also be more explicit about what a "compatible" Visual Studio means (the requirement for VC++ component).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions