roslyn: SDK 'Microsoft.NET.Sdk' not found loading CSharp project via MSBuildWorkspace.OpenProjectAsync

In the 15.9 generation of build assemblies and so forth.

We think Roslyn should be emitting some diagnostics, but more than likely we are either not handling a Solution or Project correctly, or perhaps have not fed Roslyn with the correct options, properties, etc, along these lines.

We cooked up some unit tests here for demonstration and verification purposes if someone could take a look.

Unit tests are appropriately named, one should be producing obvious errors. The other one may or may not, but in its current form we cannot know for certain.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 25 (6 by maintainers)

Most upvoted comments

I’ve been beating my head against the wall all day trying to get DocFX to stop showing this error (SDK ‘Microsoft.NET.Sdk’ not found).

What finally did it was cloning https://github.com/dotnet/docfx and updating their reference for “Microsoft.Build.Locator” from “1.2.2” to “1.4.1”. I don’t know if it applies here, but it’s what solved it for me in DocFX.

Now, I’m off to go see if I can get those guys to either update the reference or take a PR from me updating the reference.

@jamesearlkim Wow great to know, nice work!