0

I'm learning EpiServer 7 built on MVC and am now trying to make the PropertyFor work as I want it. I have a property called title and if I write it like this (code below), it renders correctly but I dont't get any intellisense for the Linq expression inside (the x). You see what namespaces I am using and I have also added System.Linq in the webconfig for views. What do I need to do to get intellisense?

@using System
@using System.Data
@using EPiServer.Cms
@using EPiServer.Core
@using EPiServer.Web.Mvc.Html

@model MyApplication.Models.Pages.StartPage

<h2 class="@Html.EditAttributes(x => x.Title)">
    @Html.PropertyFor(x => x.Title)
</h2>

Note. The alloy MVC demo site have this problem for me as well so can't find any good solution there. I can't add System.Linq in the razor page, the page can't find the reference.

Thanks!

tereško
  • 58,060
  • 25
  • 98
  • 150
Andreas
  • 2,336
  • 2
  • 28
  • 45

1 Answers1

1

A litle inactive thread but! We have one comment above that solved it in his way. For me I changed the target framework from 4.5 to 4.0 to 4.5. Voila!

Andreas
  • 2,336
  • 2
  • 28
  • 45