Skip to content

Need better logging for the native SDK resolver #15149

@KirillOsenkov

Description

@KirillOsenkov

I don't see a way to debug/investigate the decision process of the SDK resolver native .dll.

I've gotten as far as

int errorCode = Interop.RunningOnWindows
? Interop.Windows.hostfxr_resolve_sdk2(dotnetExeDirectory, globalJsonStartDirectory, flags, result.Initialize)
: Interop.Unix.hostfxr_resolve_sdk2(dotnetExeDirectory, globalJsonStartDirectory, flags, result.Initialize);

but from then on it's a black box and I don't see anything that would explain the resulting SDK that comes out of it. I want to know what factors influenced the decision:

  • did it use an environment variable?
  • did it use PATH?
  • did it use global.json?
  • which global.json?
  • was IsRunningInVisualStudio specified?

The resolver should explain its choice and clearly communicate which factors made a difference and which didn't. Otherwise I have to resort to cargo culting it and so far unsuccessfully.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions