[CSHARP-2371] Pin Cake.Git to 0.18.0 Created: 29/Aug/18  Updated: 28/Oct/23  Resolved: 06/Sep/18

Status: Closed
Project: C# Driver
Component/s: Build
Affects Version/s: None
Fix Version/s: 2.7.1

Type: Bug Priority: Major - P3
Reporter: Mark Benvenuto Assignee: Mark Benvenuto
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image-2018-09-05-14-17-18-549.png    
Backwards Compatibility: Fully Compatible

 Description   

In https://github.com/cake-contrib/Cake_Git/commit/ce283fd073a5360e10505666f2f9956aa2880b7e, Cake.Git updated to .NET Standard 2.0 which is causing the build to fail.

With diagnostic tracing enabled in Cake, you can see the following error:

Error: System.AggregateException: One or more errors occurred. ---> System.IO.FileNotFoundException: Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.
   at Cake.Git.GitAliases.GitCheckout(ICakeContext context, DirectoryPath repositoryDirectoryPath, String committishOrBranchSpec, FilePath[] filePaths)
   at Cake.Git.GitAliases.GitCheckout(ICakeContext context, DirectoryPath repositoryDirectoryPath, FilePath[] filePaths)
   at Submission#0.GlobalAssemblyInfo.RestoreGlobalAssemblyInfoFile(ICakeContext context, DirectoryPath solutionDirectory)
   at Submission#0.<<Initialize>>b__0_2()
   at Cake.Core.DefaultExecutionStrategy.InvokeFinally(Action action)
   at Cake.Core.CakeEngine.ExecuteTask(ICakeContext context, IExecutionStrategy strategy, Stopwatch stopWatch, CakeTask task, CakeReport report)
   at Cake.Core.CakeEngine.RunTarget(ICakeContext context, IExecutionStrategy strategy, String target)
   at Cake.Scripting.BuildScriptHost.RunTarget(String target)
   at Submission#0.<<Initialize>>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.<RunSubmissionsAsync>d__9`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CodeAnalysis.Scripting.Script`1.<RunSubmissionsAsync>d__21.MoveNext()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at Cake.Scripting.Roslyn.RoslynScriptSession.Execute(Script script)
   at Cake.Core.Scripting.ScriptRunner.Run(IScriptHost host, FilePath scriptPath, IDictionary`2 arguments)
   at Cake.Commands.BuildCommand.Execute(CakeOptions options)
   at Cake.CakeApplication.Run(CakeOptions options)
   at Cake.Program.Main()
---> (Inner Exception #0) System.IO.FileNotFoundException: Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.
File name: 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
   at Cake.Git.GitAliases.GitCheckout(ICakeContext context, DirectoryPath repositoryDirectoryPath, String committishOrBranchSpec, FilePath[] filePaths)
   at Cake.Git.GitAliases.GitCheckout(ICakeContext context, DirectoryPath repositoryDirectoryPath, FilePath[] filePaths)
   at Submission#0.GlobalAssemblyInfo.RestoreGlobalAssemblyInfoFile(ICakeContext context, DirectoryPath solutionDirectory)
   at Submission#0.<<Initialize>>b__0_2()
   at Cake.Core.DefaultExecutionStrategy.InvokeFinally(Action action)
   at Cake.Core.CakeEngine.ExecuteTask(ICakeContext context, IExecutionStrategy strategy, Stopwatch stopWatch, CakeTask task, CakeReport report)
   at Cake.Core.CakeEngine.RunTarget(ICakeContext context, IExecutionStrategy strategy, String target)
   at Cake.Scripting.BuildScriptHost.RunTarget(String target)
   at Submission#0.<<Initialize>>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.<RunSubmissionsAsync>d__9`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CodeAnalysis.Scripting.Script`1.<RunSubmissionsAsync>d__21.MoveNext()
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
<---



 Comments   
Comment by Githook User [ 06/Nov/18 ]

Author:

{'name': 'Mark Benvenuto', 'email': 'mark.benvenuto@mongodb.com', 'username': 'markbenvenuto'}

Message: CSHARP-2371: Pin Cake.Git to 0.18.0
Branch: v2.7.x
https://github.com/mongodb/mongo-csharp-driver/commit/234aeefda39dad57b34c522f80a8ba1693a90d50

Comment by Githook User [ 05/Sep/18 ]

Author:

{'name': 'Mark Benvenuto', 'email': 'mark.benvenuto@mongodb.com', 'username': 'markbenvenuto'}

Message: CSHARP-2371: Pin Cake.Git to 0.18.0
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/be656e6b7ebc81854bd5c0a504c11727c67c8052

Comment by Mark Benvenuto [ 29/Aug/18 ]

PR: https://github.com/mongodb/mongo-csharp-driver/pull/339

Generated at Wed Feb 07 21:42:22 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.