title: Msbuild failed when processing the file 'FILE LOCATION' with message: The SDK 'Microsoft.NET.Sdk' specified could not be found
body: <p>I'm trying to use Roslyn to take an object, then explore the entire solution and find where it is declared. That part of the code has not even been started because I can't properly set up my workspace. My code is as follows:</p>
  <pre><code>var projectPath = @&quot;C:\Repo\Pineapple\Pineapple.sln&quot;;
              using (var workspace = MSBuildWorkspace.Create())
              {
                  workspace.LoadMetadataForReferencedProjects = true;
                  var solution = workspace.OpenSolutionAsync(projectPath).Result;
                  ImmutableList&lt;WorkspaceDiagnostic&gt; diagnostics = workspace.Diagnostics;
                  foreach (var diagnostic in diagnostics)
                  {
                      Console.WriteLine(diagnostic.Message);
                  }
  
                  foreach (var project in solution.Projects)
                  {
                      foreach (var document in project.Documents)
                      {
                          Console.WriteLine(project.Name + &quot;\t\t\t&quot; + document.Name);
                      }
                  }
              }
  </code></pre>
  <p>The second set of foreach loops had originally turned up empty prompting me to explore the diagnostics. The error message I received is listed in the title and was displayed for all files I tried to access. I'm using Visual Studio 2019 with .NET Core 3.1. If it's not already obvious, I'm relatively new to this so any help would be greatly appreciated. Thanks!</p>