in aspnetcore ~ read.

Solving "vscode .csproj file type not recognized"

I recently installed the .NET Core v1.0.1 on my Mac after building my project against Preview 2. After I ran dotnet migrate to convert my project.json to .csproj VS Code gave me errors about needing to restore dependencies. When I ran dotnet restore I received an error to the effect of "vscode .csproj file type not recognized". The solution is to delete the preview version of .NET Core. Here are the steps to do that based on this answer on SuperUser.

  1. pkgutil --pkgs to see the list of packages.
  2. pkgutil --pkg-info com.microsoft.dotnet.dev.1.0.0-preview2-1-003177.component.osx.x64 to get the folder where it's installed. In my case (and probably yours too) it was in /usr/local/share/dotnet/sdk.
  3. cd /usr/local/share/dotnet/sdk
  4. sudo rm -rf 1.0.0-preview2-1-003177

That solved the problem for me.

comments powered by Disqus