c# - Visual studio intellisense messing up -


so i'm new mvc4 , c#, have been designing website 2 weeks , there have not been issues intelisense.

for 2 days visual studio telling me @viewbag , other @ commands not part of project , may missing or tells me viewbag doesn't exist in current context.

i'm unsure how fix ( have restarted project , machine im working on ) still showing underlined , tells me doesn't exists in context

since i'm still new when / try new code difficult since everything wrong..

example images :

enter image description here enter image description here enter image description here enter image description here long error can barely read states that

system.web.webpages.html.htmlhelper' not contain definition 'actionlink' .... missing assembly reference ?

i error @codes in razor view aswell exept c# @'s

webconfig file

<?xml version="1.0" encoding="utf-8"?> <!-- more information on how configure asp.net application, please visit http://go.microsoft.com/fwlink/?linkid=169433  --> <configuration> <configsections> <!-- more information on entity framework configuration, visit   http://go.microsoft.com/fwlink/?linkid=237468 --> <section name="entityframework" type="system.data.entity.internal.configfile.entityframeworksection, entityframework, version=5.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089" requirepermission="false" /> </configsections> <connectionstrings> <add name="defaultconnection" connectionstring="server=ane-sql\anesqlserver;database=oilgas;user id=software;password=glvp$102;" providername="system.data.sqlclient" /> </connectionstrings> <appsettings>  <add key="webpages:version" value="2.0.0.0" />  <add key="webpages:enabled" value="false" />  <add key="preserveloginurl" value="true" />  <add key="clientvalidationenabled" value="true" />  <add key="unobtrusivejavascriptenabled" value="true" /> </appsettings> <system.web>  <customerrors mode="remoteonly"></customerrors>   <compilation debug="true" targetframework="4.5" /> <httpruntime targetframework="4.5" /> <authentication mode="forms">   <forms loginurl="~/account/login" timeout="180" /> </authentication> <pages>   <namespaces>     <add namespace="system.web.helpers" />     <add namespace="system.web.mvc" />     <add namespace="system.web.mvc.ajax" />     <add namespace="system.web.mvc.html" />     <add namespace="system.web.optimization" />     <add namespace="system.web.routing" />     <add namespace="system.web.webpages" />   </namespaces> </pages>    </system.web> <system.webserver> <!--<modules runallmanagedmodulesforallrequests="true" />--> <validation validateintegratedmodeconfiguration="false" /> <handlers>   <remove name="extensionlessurlhandler-isapi-4.0_32bit" />   <remove name="extensionlessurlhandler-isapi-4.0_64bit" />   <remove name="extensionlessurlhandler-integrated-4.0" />   <add name="extensionlessurlhandler-isapi-4.0_32bit" path="*."   verb="get,head,post,debug,put,delete,patch,options" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness32" responsebufferlimit="0" />    <add name="extensionlessurlhandler-isapi-4.0_64bit" path="*." verb="get,head,post,debug,put,delete,patch,options" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll"   precondition="classicmode,runtimeversionv4.0,bitness64" responsebufferlimit="0" />   <add name="extensionlessurlhandler-integrated-4.0" path="*."   verb="get,head,post,debug,put,delete,patch,options"    type="system.web.handlers.transferrequesthandler"    precondition="integratedmode,runtimeversionv4.0" />   </handlers>   </system.webserver>   <runtime>   <assemblybinding xmlns="urn:schemas-microsoft-com:asm.v1">   <dependentassembly>     <assemblyidentity name="dotnetopenauth.core" publickeytoken="2780ccd10d57b246" />     <bindingredirect oldversion="1.0.0.0-4.0.0.0" newversion="4.1.0.0" />   </dependentassembly>   <dependentassembly>     <assemblyidentity name="dotnetopenauth.aspnet" publickeytoken="2780ccd10d57b246" />     <bindingredirect oldversion="1.0.0.0-4.0.0.0" newversion="4.1.0.0" />   </dependentassembly>   <dependentassembly>     <assemblyidentity name="system.web.helpers" publickeytoken="31bf3856ad364e35" />     <bindingredirect oldversion="1.0.0.0-2.0.0.0" newversion="2.0.0.0" />   </dependentassembly>   <dependentassembly>     <assemblyidentity name="system.web.mvc" publickeytoken="31bf3856ad364e35" />     <bindingredirect oldversion="1.0.0.0-4.0.0.0" newversion="4.0.0.0" />   </dependentassembly>   <dependentassembly>     <assemblyidentity name="system.web.webpages" publickeytoken="31bf3856ad364e35" />     <bindingredirect oldversion="1.0.0.0-2.0.0.0" newversion="2.0.0.0" />   </dependentassembly>   <dependentassembly>     <assemblyidentity name="webgrease" publickeytoken="31bf3856ad364e35" />     <bindingredirect oldversion="1.0.0.0-1.3.0.0" newversion="1.3.0.0" />     </dependentassembly>     </assemblybinding>    </runtime>     <entityframework>     <defaultconnectionfactory    type="system.data.entity.infrastructure.localdbconnectionfactory, entityframework">   <parameters>     <parameter value="v11.0" />      </parameters>     </defaultconnectionfactory>   </entityframework>     </configuration> 

create new internet web app take out changes ( old code ) insert newly created internet web app config file, add old changes ( skip reading line line see if of messing )

hope helps


Comments