macOS Build: "The 'Microsoft.Build.Tasks.Git.LocaleteRepository" task failed unexpectedly
See original GitHub issueOccured when building this repo
Using Visual studio for Mac (Community) 7.6.7 (build 49)
my environment:
.NET Core SDK (reflecting any global.json):
Version: 2.1.402
Commit: 3599f217f4
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.13
OS Platform: Darwin
RID: osx.10.13-x64
Base Path: /usr/local/share/dotnet/sdk/2.1.402/
Host (useful for support):
Version: 2.1.4
Commit: 85255dde3e
.NET Core SDKs installed:
2.0.0 [/usr/local/share/dotnet/sdk]
2.1.4 [/usr/local/share/dotnet/sdk]
2.1.302 [/usr/local/share/dotnet/sdk]
2.1.402 [/usr/local/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.4 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.4 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.4 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
The error:
The "Microsoft.Build.Tasks.Git.LocateRepository" task failed unexpectedly.
System.TypeInitializationException: The type initializer for 'Microsoft.Build.Tasks.Git.TaskImplementation' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Build.Tasks.Git.Operations' or one of its dependencies
at System.AppDomain.Load (System.Reflection.AssemblyName assemblyRef, System.Security.Policy.Evidence assemblySecurity) [0x001a9] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System/AppDomain.cs:777
at (wrapper remoting-invoke-with-check) System.AppDomain.Load(System.Reflection.AssemblyName,System.Security.Policy.Evidence)
at System.AppDomain.Load (System.Reflection.AssemblyName assemblyRef) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System/AppDomain.cs:714
at (wrapper remoting-invoke-with-check) System.AppDomain.Load(System.Reflection.AssemblyName)
at System.Reflection.Assembly.Load (System.Reflection.AssemblyName assemblyRef) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.Reflection/Assembly.cs:600
at Microsoft.Build.Tasks.Git.TaskImplementation..cctor () [0x0006b] in /_/src/Microsoft.Build.Tasks.Git/TaskImplementation.cs:32
--- End of inner exception stack trace ---
at Microsoft.Build.Tasks.Git.LocateRepository.Execute () [0x0000f] in /_/src/Microsoft.Build.Tasks.Git/LocateRepository.cs:27
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00023] in /_/src/Build/BackEnd/TaskExecutionHost/TaskExecutionHost.cs:631
at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteInstantiatedTask>d__26.MoveNext () [0x00212] in /_/src/Build/BackEnd/Components/RequestBuilder/TaskBuilder.cs:787
Done building project "JsonApiDotNetCore.csproj" -- FAILED.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:9
- Comments:8 (4 by maintainers)
Top Results From Across the Web
IdentityServer4: "Microsoft.Build.Tasks.Git. ...
I have cleaned the solution and build it. I am getting "Microsoft.Build.Tasks.Git.LocateRepository" task failed unexpectedly build error.
Read more >Custom Buld Task when used in csproject, throws 'Caould ...
When I build (Project B), it throws error in Visual Studio : MSB4018 "The "SimpleTask" task failed unexpectedly".
Read more >Error MSB4018: The "ResolvePackageAssets" task failed ...
Suddenly, building on Visual Studio for Mac 8.3.11 (build 1) on MacOS 10.12 is giving me this error. Please help me me resolve...
Read more >ResolvePackageAssets task failed
This issue is currently being investigated. The problem is that Mono's MSBuild does not currently support NuGet 5 so you cannot use .NET...
Read more >How to fix "WriteCodeFragment" error when build .net core
Sdk/targets/Microsoft.NET.GenerateAssemblyInfo.targets(5,5): Error MSB4018: The "WriteCodeFragment" task failed unexpectedly. System.IO.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is also happening when trying to build MvvmCross on macOS although the stack trace seems to be a bit different:
If you’re building on Mono that’s a different issue: https://github.com/dotnet/sourcelink/issues/155