Skip to content

Can't load projects in solution #1781

Closed
@ermshiperete

Description

@ermshiperete

Reproduction steps

I followed the instructions in CONTRIBUTING.md and installed the required .NET Core SDK and runtimes by running tools\Install-DotNetSdk.ps1 (I tried both with and without -InstallLocality Machine).

CONTRIBUTING.md mentions to use buildandtest.cmd to build and run the tests. I can't find that file anywhere.

Trying to open LibGit2Sharp.sln in Visual Studio 2019 (or Jetbrains Rider) fails to load the projects with:

15-04-2020 14:18:36	Critical	Some of the projects might not be read correctly. You may disable solution loading from disk or do that for certain projects.|   
Project 'LibGit2Sharp' load failed:
	[MSB4236] The SDK 'Microsoft.NET.Sdk' specified could not be found.  D:\Develop\libgit2sharp\LibGit2Sharp\LibGit2Sharp.csproj at (0:0)Project 'LibGit2Sharp.Tests' load failed:
	[MSB4236] The SDK 'Microsoft.NET.Sdk' specified could not be found.  D:\Develop\libgit2sharp\LibGit2Sharp.Tests\LibGit2Sharp.Tests.csproj at (0:0)Project 'NativeLibraryLoadTestApp.x86' load failed:
	[MSB4236] The SDK 'Microsoft.NET.Sdk' specified could not be found.  D:\Develop\libgit2sharp\NativeLibraryLoadTestApp\x86\NativeLibraryLoadTestApp.x86.csproj at (0:0)Project 'NativeLibraryLoadTestApp.x64' load failed:
	[MSB4236] The SDK 'Microsoft.NET.Sdk' specified could not be found.  D:\Develop\libgit2sharp\NativeLibraryLoadTestApp\x64\NativeLibraryLoadTestApp.x64.csproj at (0:0)

Deleting global.json allowed me to load the projects.

Version of LibGit2Sharp (release number or SHA1)

master branch: 4de700f

Operating system(s) tested; .NET runtime tested

Windows 10

Output of dotnet --info:

A compatible installed .NET Core SDK for global.json version [3.1.100] from [d:\Develop\libgit2sharp\global.json] was not found
Install the [3.1.100] .NET Core SDK or update [d:\Develop\libgit2sharp\global.json] with an installed .NET Core SDK:
  2.1.301 [C:\Program Files (x86)\dotnet\sdk]

Host (useful for support):
  Version: 3.1.3
  Commit:  4a9f85e9f8

.NET Core SDKs installed:
  2.1.301 [C:\Program Files (x86)\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.1 [C:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.1 [C:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.3 [C:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.1 [C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.3 [C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.3 [C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions