Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.0.0-beta2-19351-01 and Microsoft.Build.Tasks.Git.LocateRepository task failed unexpectedly #337

Closed
wjvii opened this issue Jul 11, 2019 · 3 comments · Fixed by #318
Closed

Comments

@wjvii
Copy link

wjvii commented Jul 11, 2019

Had a project using version 1.0.0-beta-63127-02 and updated to 1.0.0-beta2-19351-01 and started experiencing this error. I have tried this on three different project types, .NET Standard and .NET Framework and it occurs on both. I also tried a .NET Standard with targetframeowrk set to net472 and same issue. These were all brand new projects in the same git repo.

Severity Code Description Project File Line Suppression State
Error MSB4018 The "Microsoft.Build.Tasks.Git.LocateRepository" task failed unexpectedly.
System.ArgumentNullException: Value cannot be null.
Parameter name: path1
at System.IO.Path.Combine(String path1, String path2)
at Microsoft.Build.Tasks.Git.GitEnvironment.FindSystemDirectory() in //src/Microsoft.Build.Tasks.Git/GitDataReader/GitEnvironment.cs:line 88
at Microsoft.Build.Tasks.Git.GitEnvironment.CreateFromProcessEnvironment() in /
/src/Microsoft.Build.Tasks.Git/GitDataReader/GitEnvironment.cs:line 79
at Microsoft.Build.Tasks.Git.GitEnvironment.Create(String configurationScope) in //src/Microsoft.Build.Tasks.Git/GitDataReader/GitEnvironment.cs:line 64
at Microsoft.Build.Tasks.Git.RepositoryTask.GetOrCreateRepositoryInstance() in /
/src/Microsoft.Build.Tasks.Git/RepositoryTask.cs:line 112
at Microsoft.Build.Tasks.Git.RepositoryTask.ExecuteImpl() in //src/Microsoft.Build.Tasks.Git/RepositoryTask.cs:line 65
at Microsoft.Build.Tasks.Git.RepositoryTask.Execute() in /
/src/Microsoft.Build.Tasks.Git/RepositoryTask.cs:line 43
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() NuGetStandardTest C:\Users\wjvii.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-19351-01\build\Microsoft.Build.Tasks.Git.targets 24

@wjvii wjvii changed the title 1.0.0-beta2-19351-01 and 1.0.0-beta2-19351-01 and Microsoft.Build.Tasks.Git.LocateRepository task failed unexpectedly Jul 11, 2019
@jcouv
Copy link
Member

jcouv commented Jul 14, 2019

I'm getting this as well: dotnet/roslyn#28916
Found the solution. I had git installed in WSL, but not in Windows. It's probably good to have an error message for this.

@tmat
Copy link
Member

tmat commented Jul 14, 2019

@jcouv Git installation shouldn't be necessary. This is a bug.

@CreateAndInject
Copy link

I reproduce this bug also, I clone a repository and can't build since this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants