title: dotnet in Rider: cannot resolve symbol 'Microsoft'
body: <p>In Rider 2020.1.3 on macOS Catalina. I'm not normally a C# dev, so apologies for incorrect terminology.</p>
  
  <p>This is a .NET api containerized with Docker. Rider is randomly seeming to lose connection to the dotnet core libraries. It will be fine and then I'll walk away and come back and get "cannot resolve symbol 'Microsoft'" or "cannot resolve symbol 'System'" on all the imports (see attached screenshot), which of course trickles down to none of their methods being recognized either. When I build it at this point I get this error:</p>
  
  <p><code>Microsoft.PackageDependencyResolution.targets(208, 5): [NETSDK1004] Assets file '/app/[applicationName]/obj/project.assets.json' not found. Run a NuGet package restore to generate this file.</code></p>
  
  <p>Doing a NuGet package restore tells me all packages are restored, and the file it mentions exists at that location (however, it says 'no index' next to it, but not sure what that means).</p>
  
  <p>The first time it happened seemed to be because the SDK I had installed locally (3.1) was different than the one used in the project (2.2). I installed 2.2 on my machine and that fixed the issue for a bit.</p>
  
  <p>The second time it happened, later in the day after the first time, it seemed to be because Rider was favoring the 3.1 install in the Toolset and Build settings. So I deleted the 3.1 install from my system, and it fixed the issue for about a day.</p>
  
  <p>I get back on today and it's happened again. I've tried various things I've found Googling around: unchecking 'Use Resharper Build,' adding some things to the .dockerignore, verifying there's not a %20 in the top-level dir as a result of the clone.</p>
  
  <p>I am not sure what info would be relevant at this point; please let me know if some parts of the code or file structure are needed to help troubleshoot. The root of the entire project contains the directory for the API referenced here, the directory for the app, which is React, and the docker-compose.yml. The API has its own Dockerfile, as does the app.</p>
  
  <p><a href="https://i.stack.imgur.com/BzFc4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BzFc4.png" alt="Screenshot of unrecognized imports"></a></p>
  
  <p>Edit:</p>
  
  <p>What ended up fixing it was going through <a href="https://gist.github.com/sandrovicente/5590f5ac993d9d7fef038fd2858efcc3" rel="nofollow noreferrer">these steps</a> to remove dotnet completely and then redownloading 2.2</p>