Unplanned
Last Updated: 26 Oct 2023 11:15 by Mike
Mike
Created on: 26 Oct 2023 11:15
Type: Bug Report
1
Standalone Report Designer for .NET 6 cannot resolve custom assemblies

For my Object Data Source, I am using a nuget package that has a dependency on Microsoft.Extension.Primitives.  The custom assembly is correctly registered in the designer's configuration file and the DLLs are copied to the Report Designer (.NET version) directory. I get this error:

Telerik.Reporting.Expressions.InvalidExpressionException: An error has occurred while executing function UsePrimitives(). Check the InnerException for more information.
 ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Extensions.Primitives, Version=3.1.18.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. Could not find or load a specific file. (0x80131621)
File name: 'Microsoft.Extensions.Primitives, Version=3.1.18.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'
 ---> System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Extensions.Primitives, Version=3.1.18.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromPath(IntPtr ptrNativeAssemblyLoadContext, String ilPath, String niPath, ObjectHandleOnStack retAssembly)
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at System.Reflection.Assembly.LoadFromResolveHandler(Object sender, ResolveEventArgs args)
   at System.Runtime.Loader.AssemblyLoadContext.InvokeResolveEvent(ResolveEventHandler eventHandler, RuntimeAssembly assembly, String name)
   at System.Runtime.Loader.AssemblyLoadContext.OnAssemblyResolve(RuntimeAssembly assembly, String assemblyFullName)
   at ClassLibrary1.Class1.UsePrimitives()
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Telerik.Reporting.Expressions.FunctionNodeEval.Eval(Object row, Object context)
   --- End of inner exception stack trace ---
   at Telerik.Reporting.Expressions.FunctionNodeEval.Eval(Object row, Object context)
   at Telerik.Reporting.Expressions.EvalObject.Eval(ExpressionNode expressionNode, Object data, Object context)
   at Telerik.Reporting.Processing.ProcessingElement.Evaluate(Object value, Object data, EvalObject evalObject)
   at Telerik.Reporting.Processing.ProcessingElement.Evaluate(Object value)
   at Telerik.Reporting.Processing.TextBox.ProcessItem()
   at Telerik.Reporting.Processing.ReportItemBase.ProcessElement()
   at Telerik.Reporting.Processing.ProcessingElement.Process(IDataMember dataContext)


0 comments