asp.net mvc 5 - @helper in App_Code not seen after publication -


i have helper method share across multiple views this:

@helper dosomething() {     <h1>something</h1> } 

i've saved in file called pmhelpers.cshtml in app_code folder, , can run locally on dev box simple method call:

@pmhelpers.dosomething() 

and desired result. when try publish win2008r2 server following error message:

 cs0103: name 'pmhelpers' not exist in current context 

is there special setting have in webdeploy process work? declarative helpers easier @ helpers made taghelper class.

thanks, john

it turns out build action on cshtml page set "none" set "content" , worked charm.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -