I have moved all of my views to a class lib project.
Everything works fine.
I started adding these two statements to the top of each view to gain Intellisense back.
`@using RazorLight
@inherits TemplatePage
`
Now I get Intellisense in my views, but Linq statements do not work.
I even tried adding a using statement for System.Linq, but that did not help.
(6:22) 'BondPrintoutViewModel' does not contain a definition for 'Select' and no accessible extension method 'Select' accepting a first argument of type 'BondPrintoutViewModel' could be found (are you missing a using directive or an assembly reference?)
(36:36) 'BondPrintoutViewModel' does not contain a definition for 'Where' and no accessible extension method 'Where' accepting a first argument of type 'BondPrintoutViewModel' could be found (are you missing a using directive or an assembly reference?)
OS: Windows 10
Platform: .NET Core 3.1
RazorLight 2.0.0-beta9
Visual Studio version: Visual Studio Community 2019 16.6.5
I have moved all of my views to a class lib project. Everything works fine. I started adding these two statements to the top of each view to gain Intellisense back.
`@using RazorLight
@inherits TemplatePage
`
Now I get Intellisense in my views, but Linq statements do not work.
I even tried adding a using statement for System.Linq, but that did not help.
Here is the top of the view.
` @model IEnumerable
@using RazorLight
@inherits TemplatePage
@using System.Linq
@{ var cabTypes = Model.Select(x => x.CABType).Distinct().OrderBy(x => x); } `
Here is the error.
Failed to compile generated Razor template:
OS: Windows 10 Platform: .NET Core 3.1 RazorLight 2.0.0-beta9 Visual Studio version: Visual Studio Community 2019 16.6.5