VS 2015 IntelliSense: Assembly Not Referenced Error -
i switched vs 2015. have older mvc 5 app runs against 4.52. in vs 2013 it's fine.
in vs 2015 i'm getting red squigglies under @html.textboxfor()
error indicating:
the type 'expression<>' defined in assembly not referenced. must add reference assembly 'system.core, version=4.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089'.
the project builds , runs fine -- concerned intellisense error never happened in vs 2013. okay, try add reference system.core recommended in error above , error:
a reference 'system.core' not added. component automatically referenced build system.
again, fine in vs 2013.
i had same issue, in mean time i've found answer:
i had add following references web.config (add inside opening system.web tag):
<compilation debug="true" targetframework="4.5"> <assemblies> <add assembly="system.core, version=4.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089"/> <add assembly="system.data, version=4.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089"/> <add assembly="microsoft.csharp, version=4.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a"/> <add assembly="system.runtime, version=4.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a" /> <add assembly="system.web.abstractions, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" /> <add assembly="system.web.helpers, version=3.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" /> <add assembly="system.web.routing, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" /> <add assembly="system.web.webpages, version=3.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" /> <add assembly="system.web.mvc, version=5.2.3.0, culture=neutral, publickeytoken=31bf3856ad364e35" /> </assemblies> </compilation>
i changed target framework 4.5.1 4.5.
p.s close , reopen visual studio after changing it.
Comments
Post a Comment