Azure MVC4 Deployment Cannot Find WebPages or WebMatrix Links

I try to deploy a site to Azure automatically through GitHub, and after going to the main branch, Azure selects it and tries to deploy, but I get a "deploy" error message with errors such as:

App_Start \ AuthConfig.cs (1,21): error CS0234: type or namespace name "Web page" does not exist in the namespace "Microsoft.Web" (do you miss the assembly link?) [C: \ DWASFiles \ Sites \ xxxxx \ VirtualDirectory0 \ site \ repository \ xxxxx.UI.Web \ xxxxx.UI.Web.csproj]

and

Controllers \ AccountController.cs (18,7): error CS0246: type or namespace name 'WebMatrix' not found (do you miss using the directive or assembly reference?) [C: \ DWASFiles \ Sites \ xxxxx \ VirtualDirectory0 \ site \ repository \ xxxxx.UI.Web \ xxxxx.UI.Web.csproj]

MVC 4 (and WebMatrix / WebPages dependencies) are installed in my UI.Web project via NuGet, not downloadable from the GAC. Copy local value is set to true in assembly references. Any idea why I can get these deployment issues?

+7
source share
1 answer

Have you tried the NuGet package recovery deployment? Then, Azure should load all the dependencies during deployment, and GitHub is not overwhelmed with binaries.

Just right-click on the solution and click on "Enable NuGet Package Recovery". Make the .nuget folder in the solution directory using package.config in the project directory that were created.

- Regarding the current problem, you can refuse the GitHub link, which would be useful. You may have used default.ignore for Visual Studio, and this prevents binaries from compiling.

+2
source

All Articles