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

Could not load file or assembly 'Telerik.Windows.Documents.Flow #549

Open
sagittarius-rcoppins opened this issue Jan 8, 2025 · 1 comment

Comments

@sagittarius-rcoppins
Copy link

Describe the bug
When I run the below code, I get "Could not load file or assembly 'Telerik.Windows.Documents.Flow, Version=2020.3.1019.40..." This isn't even listed as a dependancy. Am I doing something wrong? I can't find any reference to this project even in the decompiled DLL, but can't get this DLL without subscribing to Telerik. Is there a way around this?

To Reproduce
I run the following in Asp.NET 4.8:

string appPath = System.Web.Hosting.HostingEnvironment.MapPath(@"\Views\Product");
var engine = new RazorLightEngineBuilder()
    .UseFileSystemProject(appPath)
    .SetOperatingAssembly(typeof(ShareBasketEmailViewModel).Assembly)
    .UseMemoryCachingProvider()
    .Build();
var result = engine.CompileRenderAsync("ShareBasketEmail.cshtml", model).GetAwaiter().GetResult();
return result;

Expected behavior
Not to receive the runtime error. result should be populated with the compiled ShareBasketEmail.cshtml with the data from model. Please see the attached redacted .csproj file:
Sitecore.Feature.Products.csproj.redacted.txt

Information (please complete the following information):

  • OS: Windows 10
  • Platform .NET Framework 4.8
  • RazorLight version 2.3.1
  • Are you using the OFFICIAL RazorLight package? Yes, from NuGet
  • Visual Studio version 17.12.3

Additional context
Add any other context about the problem here.

@doxxx
Copy link

doxxx commented Jan 8, 2025

I'm facing a similar problem. A template is failing to parse because it can't find an assembly that is not referenced anywhere in my project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants