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.

DeclarativeCompositeActivitiesConsole sample throws exception

See original GitHub issue

Hi, all!

I noticed that DeclarativeCompositeActivitiesConsole sample triggers an error.

InvalidOperationException: Unable to resolve service for type 'Microsoft.Extensions.Configuration.IConfiguration' while attempting to activate 'Elsa.Scripting.Liquid.Handlers.ConfigureLiquidEngine'.

image

Steps to reproduce:

  1. Open Elsa solution in Visual Studio
  2. Make DeclarativeCompositeActivitiesConsole your startup project
  3. Run sample project in Debug mode

Expected result: Console messages are being displayed on the screen

Actual result: The above exception is thrown.

P.S. I’m using same pattern as in the sample to run workflows from code behind and I have the same issue.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
sfmskywalkercommented, Jul 12, 2021

I pushed an update that will register IConfiguration if this service is not already present such as in the case when creating console apps.

1reaction
rzvdanielcommented, Jul 12, 2021

The sample is working fine!

Thank you for the fix!

Best! Razvan

Read more comments on GitHub >

github_iconTop Results From Across the Web

In Java, is using throws Exception instead of ...
Throwing Exception forces calling code to catch exception which they will probably not want to do for all kinds of reasons. Share.
Read more >
How to Throw Exceptions in Java
Throwing an exception is as simple as using the "throw" statement. You then specify the Exception object you wish to throw. Every Exception...
Read more >
Throwing Exceptions
Explains how to raise and handle exceptions in Cocoa applications.
Read more >
java - Why is "throws Exception" necessary when calling a ...
In Java, as you may know, exceptions can be categorized into two: One that needs the throws clause or must be handled if...
Read more >
How to use the Throws keyword in Java (and when ...
In this example, the “addInteger” method throws an IllegalArgumentException using the throw keyword in case the “integers” ArrayList object ...
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