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

Unable to build Moq: "The Microsoft.Build.Tasks.Git.LocateRepository task failed unexpectedly." #1060

Closed
weitzhandler opened this issue Sep 26, 2020 · 11 comments · Fixed by #1062

Comments

@weitzhandler
Copy link
Contributor

weitzhandler commented Sep 26, 2020

Hello,

Trying to build this project in VS 2019 (16.7.4), results in the following errors:

image

I have the following SDKs installed:

image

Am I missing any prerequisite?

Trying dotnet build results in the following output:

❯ dotnet build
Microsoft (R) Build Engine version 16.7.0-preview-20360-03+188921e2f for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
  Restored D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\tests\Moq.Tests.FSharpTypes\Moq.Tests.FSharpTypes.fsproj (in 125 ms).
  Restored D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\tests\Moq.Tests\Moq.Tests.csproj (in 349 ms).
  2 of 4 projects are up-to-date for restore.
  You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview
  You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview
  You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview
  You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview
  You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview
  You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview
  You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview
  You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: The "Microsoft.Build.Tasks.Git.LocateRepository" task failed unexpectedly. [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: System.TypeInitializationException: The type initializer for 'Microsoft.Build.Tasks.Git.TaskImplementation' threw an exception. [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:  ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Build.Tasks.Git, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: File name: 'Microsoft.Build.Tasks.Git, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:  ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Build.Tasks.Git, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: File name: 'Microsoft.Build.Tasks.Git, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.RuntimeAssembly.InternalLoad(ObjectHandleOnStack assemblyName, ObjectHandleOnStack requestingAssembly, StackCrawlMarkHandle stackMark, Boolean throwOnFileNotFound, ObjectHandleOnStack assemblyLoadContext, ObjectHandleOnStack retAssembly) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.RuntimeAssembly.InternalLoad(AssemblyName assemblyName, RuntimeAssembly requestingAssembly, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, AssemblyLoadContext assemblyLoadContext) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.Tasks.Git.GitLoaderContext.Load(AssemblyName assemblyName) in /_/src/Microsoft.Build.Tasks.Git/GitLoaderContext.cs:line 24 [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingLoad(AssemblyName assemblyName) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Runtime.Loader.AssemblyLoadContext.Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.RuntimeAssembly.GetType(QCallAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type, ObjectHandleOnStack keepAlive, ObjectHandleOnStack assemblyLoadContext) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.Assembly.GetType(String name, Boolean throwOnError) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.Tasks.Git.TaskImplementation..cctor() in /_/src/Microsoft.Build.Tasks.Git/TaskImplementation.cs:line 35 [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    --- End of inner exception stack trace --- [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.Tasks.Git.LocateRepository.Execute() in /_/src/Microsoft.Build.Tasks.Git/LocateRepository.cs:line 18 [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: The "Microsoft.Build.Tasks.Git.LocateRepository" task failed unexpectedly. [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: System.TypeInitializationException: The type initializer for 'Microsoft.Build.Tasks.Git.TaskImplementation' threw an exception. [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:  ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Build.Tasks.Git, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: File name: 'Microsoft.Build.Tasks.Git, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:  ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Build.Tasks.Git, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: File name: 'Microsoft.Build.Tasks.Git, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.RuntimeAssembly.InternalLoad(ObjectHandleOnStack assemblyName, ObjectHandleOnStack requestingAssembly, StackCrawlMarkHandle stackMark, Boolean throwOnFileNotFound, ObjectHandleOnStack assemblyLoadContext, ObjectHandleOnStack retAssembly) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.RuntimeAssembly.InternalLoad(AssemblyName assemblyName, RuntimeAssembly requestingAssembly, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, AssemblyLoadContext assemblyLoadContext) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.Tasks.Git.GitLoaderContext.Load(AssemblyName assemblyName) in /_/src/Microsoft.Build.Tasks.Git/GitLoaderContext.cs:line 24 [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingLoad(AssemblyName assemblyName) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Runtime.Loader.AssemblyLoadContext.Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.RuntimeAssembly.GetType(QCallAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type, ObjectHandleOnStack keepAlive, ObjectHandleOnStack assemblyLoadContext) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.Assembly.GetType(String name, Boolean throwOnError) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.Tasks.Git.TaskImplementation..cctor() in /_/src/Microsoft.Build.Tasks.Git/TaskImplementation.cs:line 35 [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    --- End of inner exception stack trace --- [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.Tasks.Git.LocateRepository.Execute() in /_/src/Microsoft.Build.Tasks.Git/LocateRepository.cs:line 18 [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
  Moq.Tests.FSharpTypes -> D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\tests\Moq.Tests.FSharpTypes\bin\Release\net472\Moq.Tests.FSharpTypes.dll
  Moq.Tests.FSharpTypes -> D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\tests\Moq.Tests.FSharpTypes\bin\Release\netcoreapp3.1\Moq.Tests.FSharpTypes.dll

Build FAILED.

C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: The "Microsoft.Build.Tasks.Git.LocateRepository" task failed unexpectedly. [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: System.TypeInitializationException: The type initializer for 'Microsoft.Build.Tasks.Git.TaskImplementation' threw an exception. [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:  ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Build.Tasks.Git, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: File name: 'Microsoft.Build.Tasks.Git, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:  ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Build.Tasks.Git, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: File name: 'Microsoft.Build.Tasks.Git, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.RuntimeAssembly.InternalLoad(ObjectHandleOnStack assemblyName, ObjectHandleOnStack requestingAssembly, StackCrawlMarkHandle stackMark, Boolean throwOnFileNotFound, ObjectHandleOnStack assemblyLoadContext, ObjectHandleOnStack retAssembly) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.RuntimeAssembly.InternalLoad(AssemblyName assemblyName, RuntimeAssembly requestingAssembly, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, AssemblyLoadContext assemblyLoadContext) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.Tasks.Git.GitLoaderContext.Load(AssemblyName assemblyName) in /_/src/Microsoft.Build.Tasks.Git/GitLoaderContext.cs:line 24 [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingLoad(AssemblyName assemblyName) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Runtime.Loader.AssemblyLoadContext.Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.RuntimeAssembly.GetType(QCallAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type, ObjectHandleOnStack keepAlive, ObjectHandleOnStack assemblyLoadContext) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.Assembly.GetType(String name, Boolean throwOnError) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.Tasks.Git.TaskImplementation..cctor() in /_/src/Microsoft.Build.Tasks.Git/TaskImplementation.cs:line 35 [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    --- End of inner exception stack trace --- [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.Tasks.Git.LocateRepository.Execute() in /_/src/Microsoft.Build.Tasks.Git/LocateRepository.cs:line 18 [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: The "Microsoft.Build.Tasks.Git.LocateRepository" task failed unexpectedly. [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: System.TypeInitializationException: The type initializer for 'Microsoft.Build.Tasks.Git.TaskImplementation' threw an exception. [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:  ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Build.Tasks.Git, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: File name: 'Microsoft.Build.Tasks.Git, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:  ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Build.Tasks.Git, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: File name: 'Microsoft.Build.Tasks.Git, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.RuntimeAssembly.InternalLoad(ObjectHandleOnStack assemblyName, ObjectHandleOnStack requestingAssembly, StackCrawlMarkHandle stackMark, Boolean throwOnFileNotFound, ObjectHandleOnStack assemblyLoadContext, ObjectHandleOnStack retAssembly) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.RuntimeAssembly.InternalLoad(AssemblyName assemblyName, RuntimeAssembly requestingAssembly, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, AssemblyLoadContext assemblyLoadContext) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.Tasks.Git.GitLoaderContext.Load(AssemblyName assemblyName) in /_/src/Microsoft.Build.Tasks.Git/GitLoaderContext.cs:line 24 [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingLoad(AssemblyName assemblyName) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Runtime.Loader.AssemblyLoadContext.Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.RuntimeAssembly.GetType(QCallAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type, ObjectHandleOnStack keepAlive, ObjectHandleOnStack assemblyLoadContext) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.Assembly.GetType(String name, Boolean throwOnError) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.Tasks.Git.TaskImplementation..cctor() in /_/src/Microsoft.Build.Tasks.Git/TaskImplementation.cs:line 35 [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    --- End of inner exception stack trace --- [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.Tasks.Git.LocateRepository.Execute() in /_/src/Microsoft.Build.Tasks.Git/LocateRepository.cs:line 18 [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
    0 Warning(s)
    2 Error(s)

Time Elapsed 00:00:05.82
@stakx
Copy link
Contributor

stakx commented Sep 27, 2020

Seems like you're building with a preview version of .NET tooling, perhaps try building with a stable version.

@weitzhandler
Copy link
Contributor Author

I'll try that. Meanwhile I'm gonna close this issue. Thanks for your response.

@weitzhandler
Copy link
Contributor Author

After spending a nice half an hour uninstalling and installing some versions of .NET, I still can't get it to work.
I'm getting the same errors.

Here's my current output, what am I missing?

Microsoft (R) Build Engine version 16.7.0+7fb82e5b2 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
  Restored D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\tests\Moq.Tests.FSharpTypes\Moq.Tests.FSharpTypes.fsproj (in 219 ms).
  Restored D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\tests\Moq.Tests\Moq.Tests.csproj (in 379 ms).
  2 of 4 projects are up-to-date for restore.
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: The "Microsoft.Build.Tasks.Git.LocateRepository" task failed unexpectedly. [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: System.TypeInitializationException: The type initializer for 'Microsoft.Build.Tasks.Git.TaskImplementation' threw an exception. [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:  ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Build.Tasks.Git, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: File name: 'Microsoft.Build.Tasks.Git, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:  ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Build.Tasks.Git, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: File name: 'Microsoft.Build.Tasks.Git, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, RuntimeAssembly assemblyContext, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, AssemblyLoadContext assemblyLoadContext) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, StackCrawlMark& stackMark, AssemblyLoadContext assemblyLoadContext) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.Assembly.Load(AssemblyName assemblyRef, StackCrawlMark& stackMark, AssemblyLoadContext assemblyLoadContext) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.Tasks.Git.GitLoaderContext.Load(AssemblyName assemblyName) in /_/src/Microsoft.Build.Tasks.Git/GitLoaderContext.cs:line 24 [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingLoad(AssemblyName assemblyName) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Runtime.Loader.AssemblyLoadContext.Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:  [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:  [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.RuntimeAssembly.GetType(QCallAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type, ObjectHandleOnStack keepAlive, ObjectHandleOnStack assemblyLoadContext) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.Assembly.GetType(String name, Boolean throwOnError) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.Tasks.Git.TaskImplementation..cctor() in /_/src/Microsoft.Build.Tasks.Git/TaskImplementation.cs:line 35 [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:  [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:  [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    --- End of inner exception stack trace --- [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.Tasks.Git.LocateRepository.Execute() in /_/src/Microsoft.Build.Tasks.Git/LocateRepository.cs:line 18 [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: The "Microsoft.Build.Tasks.Git.LocateRepository" task failed unexpectedly. [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: System.TypeInitializationException: The type initializer for 'Microsoft.Build.Tasks.Git.TaskImplementation' threw an exception. [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:  ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Build.Tasks.Git, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: File name: 'Microsoft.Build.Tasks.Git, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:  ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Build.Tasks.Git, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: File name: 'Microsoft.Build.Tasks.Git, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, RuntimeAssembly assemblyContext, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, AssemblyLoadContext assemblyLoadContext) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, StackCrawlMark& stackMark, AssemblyLoadContext assemblyLoadContext) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.Assembly.Load(AssemblyName assemblyRef, StackCrawlMark& stackMark, AssemblyLoadContext assemblyLoadContext) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.Tasks.Git.GitLoaderContext.Load(AssemblyName assemblyName) in /_/src/Microsoft.Build.Tasks.Git/GitLoaderContext.cs:line 24 [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingLoad(AssemblyName assemblyName) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Runtime.Loader.AssemblyLoadContext.Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:  [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:  [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.RuntimeAssembly.GetType(QCallAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type, ObjectHandleOnStack keepAlive, ObjectHandleOnStack assemblyLoadContext) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.Assembly.GetType(String name, Boolean throwOnError) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.Tasks.Git.TaskImplementation..cctor() in /_/src/Microsoft.Build.Tasks.Git/TaskImplementation.cs:line 35 [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:  [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:  [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    --- End of inner exception stack trace --- [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.Tasks.Git.LocateRepository.Execute() in /_/src/Microsoft.Build.Tasks.Git/LocateRepository.cs:line 18 [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
  Moq.Tests.FSharpTypes -> D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\tests\Moq.Tests.FSharpTypes\bin\Release\net472\Moq.Tests.FSharpTypes.dll
  Moq.Tests.FSharpTypes -> D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\tests\Moq.Tests.FSharpTypes\bin\Release\netcoreapp3.1\Moq.Tests.FSharpTypes.dll

Build FAILED.

C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: The "Microsoft.Build.Tasks.Git.LocateRepository" task failed unexpectedly. [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: System.TypeInitializationException: The type initializer for 'Microsoft.Build.Tasks.Git.TaskImplementation' threw an exception. [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:  ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Build.Tasks.Git, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: File name: 'Microsoft.Build.Tasks.Git, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:  ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Build.Tasks.Git, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: File name: 'Microsoft.Build.Tasks.Git, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, RuntimeAssembly assemblyContext, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, AssemblyLoadContext assemblyLoadContext) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, StackCrawlMark& stackMark, AssemblyLoadContext assemblyLoadContext) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.Assembly.Load(AssemblyName assemblyRef, StackCrawlMark& stackMark, AssemblyLoadContext assemblyLoadContext) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.Tasks.Git.GitLoaderContext.Load(AssemblyName assemblyName) in /_/src/Microsoft.Build.Tasks.Git/GitLoaderContext.cs:line 24 [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingLoad(AssemblyName assemblyName) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Runtime.Loader.AssemblyLoadContext.Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:  [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:  [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.RuntimeAssembly.GetType(QCallAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type, ObjectHandleOnStack keepAlive, ObjectHandleOnStack assemblyLoadContext) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.Assembly.GetType(String name, Boolean throwOnError) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.Tasks.Git.TaskImplementation..cctor() in /_/src/Microsoft.Build.Tasks.Git/TaskImplementation.cs:line 35 [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:  [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:  [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    --- End of inner exception stack trace --- [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.Tasks.Git.LocateRepository.Execute() in /_/src/Microsoft.Build.Tasks.Git/LocateRepository.cs:line 18 [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: The "Microsoft.Build.Tasks.Git.LocateRepository" task failed unexpectedly. [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: System.TypeInitializationException: The type initializer for 'Microsoft.Build.Tasks.Git.TaskImplementation' threw an exception. [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:  ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Build.Tasks.Git, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: File name: 'Microsoft.Build.Tasks.Git, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:  ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Build.Tasks.Git, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: File name: 'Microsoft.Build.Tasks.Git, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, RuntimeAssembly assemblyContext, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, AssemblyLoadContext assemblyLoadContext) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, StackCrawlMark& stackMark, AssemblyLoadContext assemblyLoadContext) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.Assembly.Load(AssemblyName assemblyRef, StackCrawlMark& stackMark, AssemblyLoadContext assemblyLoadContext) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.Tasks.Git.GitLoaderContext.Load(AssemblyName assemblyName) in /_/src/Microsoft.Build.Tasks.Git/GitLoaderContext.cs:line 24 [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingLoad(AssemblyName assemblyName) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Runtime.Loader.AssemblyLoadContext.Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:  [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:  [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.RuntimeAssembly.GetType(QCallAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type, ObjectHandleOnStack keepAlive, ObjectHandleOnStack assemblyLoadContext) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at System.Reflection.Assembly.GetType(String name, Boolean throwOnError) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.Tasks.Git.TaskImplementation..cctor() in /_/src/Microsoft.Build.Tasks.Git/TaskImplementation.cs:line 35 [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:  [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:  [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    --- End of inner exception stack trace --- [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.Tasks.Git.LocateRepository.Execute() in /_/src/Microsoft.Build.Tasks.Git/LocateRepository.cs:line 18 [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
C:\Users\Shimmy\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\src\Moq\Moq.csproj]
    0 Warning(s)
    2 Error(s)

Time Elapsed 00:00:05.22

@stakx

This comment has been minimized.

@stakx
Copy link
Contributor

stakx commented Sep 29, 2020

Scratch my above comment, I can reproduce. I'll look into it.

@stakx stakx reopened this Sep 29, 2020
@stakx stakx changed the title Unable to build moq4 Unable to build Moq: "The Microsoft.Build.Tasks.Git.LocateRepository task failed unexpectedly." Sep 29, 2020
@stakx
Copy link
Contributor

stakx commented Sep 29, 2020

@weitzhandler, should be fixed now. Please let me know if this build error has gone away for you, too.

@stakx stakx removed the help wanted label Sep 29, 2020
@weitzhandler
Copy link
Contributor Author

weitzhandler commented Sep 29, 2020

Well now dotnet build/dotnet test succeed, while building/testing within VS fails with the same errors as in my first screenshot, text:

FS2014 A problem occurred writing the binary 'D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\tests\Moq.Tests.FSharpTypes\obj\Debug\net472\Moq.Tests.FSharpTypes.dll': A call to StrongNameSignatureSize failed (Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))) Moq.Tests.FSharpTypes (net472)

FS2014 A problem occurred writing the binary 'D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\tests\Moq.Tests.FSharpTypes\obj\Debug\netcoreapp3.1\Moq.Tests.FSharpTypes.dll': A call to StrongNameSignatureSize failed (Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))) Moq.Tests.FSharpTypes (net472)

CS0006 Metadata file 'D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\tests\Moq.Tests.FSharpTypes\bin\Debug\netcoreapp3.1\Moq.Tests.FSharpTypes.dll' could not be found Moq.Tests (net472)

CS0006 Metadata file 'D:\Users\Shimmy\Source\Repos\weitzhandler\moq4\tests\Moq.Tests.FSharpTypes\bin\Debug\net472\Moq.Tests.FSharpTypes.dll' could not be found Moq.Tests (net472)

@stakx
Copy link
Contributor

stakx commented Sep 29, 2020

Hmm, I suspect this is the same problem as dotnet/fsharp#6987, for which a fix has been merged. Guessing from dotnet/fsharp@038fd2f, I suspect this issue will go away in Visual Studio ≥16.8.

(If this issue persists after a VS update, and several more Moq devs are running into it, we will have to consider whether to stop strong-naming the test assemblies; but let's keep that as is for now.)

@weitzhandler
Copy link
Contributor Author

Yikes. Another reason to start using preview versions of VS for me. I'm currently on a project at work that upgraded to .NET 5, but jumped to the latest version (RC) which requires VS preview 😈 I'm fine with preview SDKs but not the biggest fan of using a preview IDE...
Anyway thanks for your efforts @stakx!

@stakx
Copy link
Contributor

stakx commented Sep 29, 2020

You're welcome @weitzhandler.

Regarding VS, at least you can still use it... VS 2019 has become near unusable on my (fairly recent!) laptop because it's sooo resource hungry. I'd use VS 2017, but obviously that doesn't work with projects that target .NET Core 3 (basically everything these days). While I love the idea of a managed compiler (Roslyn) and all the smart code analysis that it can do now, one can tell that all of this doesn't come for free. 😞

@weitzhandler
Copy link
Contributor Author

because it's sooo resource hungry

wow didn't know that. that maybe explains why i started hating working on my laptop lately.

generateui pushed a commit to Evidos/SignhostClientLibrary that referenced this issue Sep 12, 2022
Seems like a more common issue with this beta  version of the Microsoft.SourceLink.Github package. A simple update to 1.0.0 solves this. See also: devlooped/moq#1060
generateui pushed a commit to Evidos/SignhostClientLibrary that referenced this issue Oct 10, 2022
Seems like a more common issue with this beta  version of the Microsoft.SourceLink.Github package. A simple update to 1.0.0 solves this. See also: devlooped/moq#1060
@devlooped devlooped locked and limited conversation to collaborators Sep 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants