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.

Cannot build project with 2.0.0-alpha3

See original GitHub issue

The following line:

services.AddRazorLight("/Views");

gives build error:

      Error CS7069: Reference to type 'IEngineConfiguration' claims it is defined in 'RazorLight', but it could not be found (71, 13)

Any ideas? Same happens with alpha1 and alpha2 versions.

edit: Workaround found in this comment: https://github.com/toddams/RazorLight/issues/63#issuecomment-328362211

        services.AddSingleton<IRazorLightEngine>(f =>
        {
            return (new EngineFactory())
                .ForFileSystem($"{Environment.ContentRootPath}\\Views");
        });

Except instead of Environment I use IHostingEnvironment env that I added as a parameter to ConfigureServices like this (example): public void ConfigureServices(IServiceCollection services, IHostingEnvironment env, IConfiguration config)

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
Torshecommented, Dec 17, 2019

Yes sir. I will make an example tomorow.

0reactions
jzabroskicommented, Dec 17, 2019

Can you create an example project in a new issue? I’m not familiar with Razorlight.mvc as I started helping with Razorlight 2.0 bera2. I don’t mind looking into this but without a repro, not sure where to start.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Couldn't Find com.android.tools.build:gradle:2.0.0-alpha3
The current latest version (to use with Android-Studio 1.3-preview) is 1.3.0-beta1. Put this in your root build.gradle. buildscript { ...
Read more >
Unable to build project after updating to version 2.0.0-alpha.3
Hi, I am using the below dependencies "dependencies": { "moment": "^2.24.0", "react": "^16.6.3", "react-native": "^0.58.4", ...
Read more >
Android Studio error when using gradle plugin 2.0.0-alpha3 ...
I seem to have found a workaround: You need to skip the dependencies part of the buildScript of your subproject if you are...
Read more >
Non-resolvable parent POM: Failure to find org....
This is the error i'm getting when trying to clean and compile anything from the quickstarts section. The pom.xml is as I got...
Read more >
VS for Mac cannot build .Net Standard projects
I have VS2017 running on Windows under a parallels VM. I select File, New Project and create an empty, Xamarin Forms project using...
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