after updating from:
<package id="Google.Api.Gax" version="4.10.0" />
<package id="Google.Api.Gax.Grpc" version="4.10.0" />
<package id="Google.Api.CommonProtos" version="2.16.0" />
...to:
<package id="Google.Api.Gax" version="4.11.0" />
<package id="Google.Api.Gax.Grpc" version="4.11.0" />
<package id="Google.Api.CommonProtos" version="2.17.0" />
in a .NET Framework 4.8 project that also uses Scriban 6.2.1 (which references older versions of System.ValueTuple), I encountered this error at runtime:
System.TypeInitializationException The type initializer for 'Scriban.Functions.BuiltinFunctions' threw an exception.
System.TypeInitializationException: The type initializer for 'Scriban.Functions.BuiltinFunctions' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Scriban.Functions.DateTimeFunctions' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.ValueTuple, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.
at Scriban.Functions.DateTimeFunctions..cctor()
--- End of inner exception stack trace ---
at Scriban.Functions.BuiltinFunctions.DefaultBuiltins..ctor()
at Scriban.Functions.BuiltinFunctions..cctor()
--- End of inner exception stack trace ---
at Scriban.Functions.BuiltinFunctions..ctor()
at Scriban.TemplateContext..ctor(ScriptObject builtin, IEqualityComparer1 keyComparer)
at
Environment details
- OS: Windows 10 64 / Windows server
- .NET version: .NET Framework 4.8
- Package name and version:
- Visual Studio 2022, packages.config-based project
Steps to reproduce
- add Scriban 6.2.1
- add
- run scriban code
Expected behavior:
That newer versions would not introduce assembly conflicts in .NET Framework environments, or that appropriate binding redirects would be added during NuGet installation.
Github issue: https://github.com/googleapis/google-cloud-dotnet/issues/14826