A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/toddams/RazorLight/issues/188 below:

.NET Core v2.1 SDK broke RazorLight in console app · Issue #188 · toddams/RazorLight · GitHub

I was using RazorLight fine in VS2017 with .NET Core 2.0. I've tested to upgrade to .NET Core 2.1 SDK (so it's building using .NET Core 2.1 RC1, but also tested with the release of 2.1, same issue) and that broke my console app when calling CompileRenderAsync. It still works if I call this from a ASP.NET Core project type (which is targeting .NET Core 2.0). I have PreserveCompilationContext in the csproj set to true, but still getting this:

Failed to compile generated Razor template:
- (3:35) The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
- (3:63) Predefined type 'System.String' is not defined or imported
- (3:76) Predefined type 'System.Type' is not defined or imported
- (3:10) Predefined type 'System.Void' is not defined or imported
- (11:37) The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.

(and 100s more of these)

I saw this issue, but I'm not 100% sure it's related: dotnet/sdk#2092. To me it seems something in the build process has changed, but I don't know if it's a known issue or if there is a fix.

Shaddix, alexzaytsev-newsroomly and nZeus


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4