question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

An exception of type 'System.ArgumentNullException' occurred in RazorLight.dll but was not handled in user code: 'Value cannot be null.'

See original GitHub issue

When running this line of codes in .net core 3 (mac) I got this exception (👆)

var engine = new RazorLightEngineBuilder().UseMemoryCachingProvider().Build();

I am new to this RazorLight so apology if this exception is kinda obvious to some folks if not most.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:11

github_iconTop GitHub Comments

1reaction
mruttercommented, Dec 6, 2019

I have the same problem with .NET Core 2.2. Right now I solved the issue by adding UseFileSystemProject and pointing to an empty folder:

var engine = new RazorLightEngineBuilder() .UseFileSystemProject("/TEMP~EMPTY") .UseMemoryCachingProvider() .Build();

1reaction
K-Cyganiakcommented, Dec 6, 2019

@one-matrix @kulashaker30 I can confirm that rolling back to 2.0.0-beta1solved this issue for me too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

'System.ArgumentNullException' occurred in System.Data. ...
As the exception is being thrown in the System. Data. DataSetExtensions. dll my guess would be that it came from the AsEnumerable() method...
Read more >
FIX: ArgumentNullException exception error message ...
ArgumentNullException exception is thrown together with the following error message: Value cannot be null. Note This problem does not occur when the client ......
Read more >
Exception unhandled Value cannot be null
Exception Unhandled System.ArgumentNullException: 'Value cannot be null. (Parameter 'input')'. I get this everytime I try to run or debug a ...
Read more >
System.ArgumentNullException: 'Value cannot be null. '
I'm using Editor 2.0.8 for .Net Core and I got into the following issue and the exception doesn't have enough details to know...
Read more >
Value cannot be null. (Parameter 'name')
ArgumentNullException : Value cannot be null. (Parameter 'name')" and I am thinking it is because "datacontext" is missing in below code snippet:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found