Cannot build project with 2.0.0-alpha3
See original GitHub issueThe 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:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes sir. I will make an example tomorow.
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.