Common Language Runtime detected error in asp.net mvc views -
visual studio intellisense shows me error "common language runtime detected , invalid program when hover mouse on top of asp.net mvc view. here code of view.
@model skillkindleweb.viewmodels.bankdetails.indexviewmodel @{ viewbag.title = "bank details"; layout = "~/views/shared/_trainerlayout.cshtml"; } @html.hidden("listurl", url.action("list","bankdetails")) <div id="content-header"> @html.partial("summarypartial", model.bankdetails) </div> @section scripts { @scripts.render("~/content/scripts/bankdetails") }
if ignore , try run program same error. attached stack trace same.
i have done failed.
thanks in advance.
> [invalidprogramexception: common language runtime detected invalid > program.] > system.web.razor.parser.syntaxtree.block..ctor(blockbuilder source) +0 > system.web.razor.parser.syntaxtree.blockbuilder.build() +195 > system.web.razor.parser.parsercontext.endblock() +336 > system.web.razor.utils.disposableaction.dispose(boolean disposing) > +292 system.web.razor.utils.disposableaction.dispose() +181 system.web.razor.parser.csharpcodeparser.parseblock() +1133 > system.web.razor.parser.htmlmarkupparser.otherparserblock() +285 > system.web.razor.parser.htmlmarkupparser.skiptoandparsecode(func`2 > condition) +707 > system.web.razor.parser.htmlmarkupparser.skiptoandparsecode(htmlsymboltype > type) +353 system.web.razor.parser.htmlmarkupparser.parsedocument() > +367 system.web.razor.parser.razorparser.parsecore(itextdocument input) +493 system.web.razor.parser.razorparser.parse(itextdocument > input) +233 > system.web.razor.razortemplateengine.generatecodecore(itextdocument > input, string classname, string rootnamespace, string sourcefilename, > nullable`1 canceltoken) +685 > system.web.razor.razortemplateengine.generatecode(textreader input, > string classname, string rootnamespace, string sourcefilename, > nullable`1 canceltoken) +447 > system.web.razor.razortemplateengine.generatecode(textreader input, > string classname, string rootnamespace, string sourcefilename) +374 > system.web.webpages.razor.razorbuildprovider.ensuregeneratedcode() > +357 system.web.webpages.razor.razorbuildprovider.get_codecompilertype() > +192 system.web.compilation.buildprovider.getcompilertypefrombuildprovider(buildprovider > buildprovider) +320 > system.web.compilation.buildproviderscompiler.processbuildproviders() > +558 system.web.compilation.buildproviderscompiler.performbuild() +187 system.web.compilation.buildmanager.compilewebfile(virtualpath virtualpath) +826 > system.web.compilation.buildmanager.getvpathbuildresultinternal(virtualpath > virtualpath, boolean nobuild, boolean allowcrossapp, boolean > allowbuildinprecompile, boolean throwifnotfound, boolean > ensureisuptodate) +733 > system.web.compilation.buildmanager.getvpathbuildresultwithnoassert(httpcontext > context, virtualpath virtualpath, boolean nobuild, boolean > allowcrossapp, boolean allowbuildinprecompile, boolean > throwifnotfound, boolean ensureisuptodate) +143 > system.web.compilation.buildmanager.getvirtualpathobjectfactory(virtualpath > virtualpath, httpcontext context, boolean allowcrossapp, boolean > throwifnotfound) +222 > system.web.compilation.buildmanager.getobjectfactory(string > virtualpath, boolean throwifnotfound) +337 > system.web.mvc.buildmanagerwrapper.system.web.mvc.ibuildmanager.fileexists(string > virtualpath) +260 > system.web.mvc.buildmanagerviewengine.fileexists(controllercontext > controllercontext, string virtualpath) +312
i working reason started getting issue. exact same code works on machine. have tried following
- cleanup solution
- delete c:\windows\microsoft.net\framework{version}\temporary asp.net files
- restarting machine.
i think clean temporary files machine. hope problem disappear
Comments
Post a Comment