After deploying to AppHarbor I get the Type or namespace name "WebActivator" could not be found

I upload my first app to AppHarbor and I get the following error:

"The type or namespace name 'WebActivator' could not be found (did you specify a usage directive or assembly reference?)"

The solution builds correctly in dev environment and other build servers using MSBuild.

I couldn't find any help on the AppHarbor support page, any idea what might be going on?

thank

+3


source to share


3 answers


You can use the command in your nuget:

Install-Package WebActivator -version 1.5.3

      

EDIT



Here's a link to the nuget page .

Install-Package WebActivatorEx

+3


source


I had the same problem in the code below:

[assembly: WebActivator.PreApplicationStartMethod(
    typeof(myApp.Web.App_Start.BreezeWebApiConfig), "RegisterBreezePreStart")]

      



And I found that in newer versions WebActivator

its namespace is changed to WebActivatorEx

; So below the code to solve my problem:

[assembly: WebActivatorEx.PreApplicationStartMethod(
    typeof(myApp.Web.App_Start.BreezeWebApiConfig), "RegisterBreezePreStart")]

      

+1


source


It looks like the WebActivator DLL is not copied to the bin folder. Make sure in VS you have Copy Local set to true and that your deployment script includes this file.

You might want to clear your local solution / deployment folder by deleting all instances of WebActivator to try to reproduce the problem.

0


source







All Articles