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

Cannot build latest master #16656

Closed
ErikEJ opened this issue Jul 18, 2019 · 10 comments
Closed

Cannot build latest master #16656

ErikEJ opened this issue Jul 18, 2019 · 10 comments

Comments

@ErikEJ
Copy link
Contributor

ErikEJ commented Jul 18, 2019

Running command line build of latest master fails with:

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.<ExecuteInstantiatedTask>d__26.MoveNext()	EFCore.Analyzers	C:\Users\Erik\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-19351-01\build\Microsoft.Build.Tasks.Git.targets	24	

@smitpatel
Copy link
Contributor

Running fine for me. Can you do all the cleaning rituals and try again?

@ajcvickers
Copy link
Member

@ErikEJ Are you still having issues? Anything we can help with?

@ErikEJ
Copy link
Contributor Author

ErikEJ commented Jul 19, 2019

I had similar issue on a second machine, and it was because I did not have the latest preview 6 SDK installed (from June 12), but an earlier one. I will close this, wising there was a way to have a check of some sort at the start of the build process, it took me a few attempts to figure out. But I guess it is all a point in time issue.

@ErikEJ ErikEJ closed this as completed Jul 19, 2019
@ajcvickers ajcvickers added the closed-no-further-action The issue is closed and no further action is planned. label Jul 19, 2019
@ErikEJ
Copy link
Contributor Author

ErikEJ commented Jul 20, 2019

Did all the cleaning, installed the correct SDK, build still failing with same error !?

@ErikEJ ErikEJ reopened this Jul 20, 2019
@ErikEJ
Copy link
Contributor Author

ErikEJ commented Jul 20, 2019

I a running from a fork and has a origin and upstream remotes (unlike you guys do) - I wonder if this is related to this recent bug fix, which is not in the package currently used by EF Core build: dotnet/sourcelink@855afb5

(EF Core build uses the previous package version: 1.0.0-beta2-19351-01 )

@ErikEJ
Copy link
Contributor Author

ErikEJ commented Jul 20, 2019

OK, it turns out this piece of code assumes that git.exe is in the PATH - and of course that is not the case on either of my machines!

https://github.com/dotnet/sourcelink/blob/master/src/Microsoft.Build.Tasks.Git/GitDataReader/GitEnvironment.cs#L125

It seems like a steep requirement for a build to succeed - but at least a more helpful error message would be useful!

After adding git.exe to the path, the build runs! 😄

@ErikEJ
Copy link
Contributor Author

ErikEJ commented Jul 20, 2019

I have created an issue in the sourcelink repo

@ajcvickers ajcvickers removed the closed-no-further-action The issue is closed and no further action is planned. label Jul 20, 2019
@ajcvickers
Copy link
Member

Thanks for getting to the bottom of this @ErikEJ!

@ErikEJ
Copy link
Contributor Author

ErikEJ commented Jul 20, 2019

Is this something that should be added to the wiki? (Building the code wiki page)

@tmat
Copy link
Member

tmat commented Jul 21, 2019

This is a bug. Source Link does not require git.exe isntalled on the machine. It's already been fixed: dotnet/sourcelink#337, included in Arcade via dotnet/arcade#3302.

@ErikEJ ErikEJ closed this as completed Jul 21, 2019
@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants