0

I am having an issue publishing an mvc web project. There was an old version of the site from months ago, but the application has since changed significantly.

I am getting an error like the following CS0246: The type or namespace name 'MvcSiteMapProvider' could not be found (are you missing a using directive or an assembly reference?)

This code is not anywhere in the application. The code runs perfect locally. The error is triggered by a temp file for the views. Source File: D:\local\Temporary ASP.NET Files\root\447331cc\dd5a3321\App_Web_index.cshtml.a8d08dba.hasupjvq.0.cs Line: 28

I can't get the new view to overwrite the file. I have never had this issue in deploying well over 100 applications to Azure.

I've tried adding a custom tempdirectory to the web app, but it's still generating the error / invalid source code. I've also tried to enable precompile views on publish. This is still not helping.

I am at a loss, and we have to use that web app, as the cms licensing is bound to the domain. Has anyone had this issue?

eg_dac
  • 701
  • 4
  • 14

1 Answers1

0

Are you publishing this Web App through Web Deploy?

If so, I would suggest checking the "Remove additional files at destination" box under the Settings area, if you haven't already.

How to Deploy Web Project from Visual Studio

Ethan
  • 144
  • 11
  • Hey sorry for the delay. I am using web deploy, but i've tried all types of different combinations of file deletion, precompile views etc. I've also tried deploying to a brand new azure app, and i am getting hte same issue. – eg_dac May 04 '18 at 19:35
  • Do you have access to the temp files on the web server instance being deployed to? You could try deleting that file from that location on the server itself. If not, it looks like this person tried adding a temporary file to the bin directory specifically to trigger the actual file removal. [Clear Temp ASP.NET Files](https://stackoverflow.com/questions/19408271/clear-temp-asp-net-files-from-azure-web-site) – Ethan May 05 '18 at 03:40
  • I had to go another route. Customers can't delete temp files from Azure, as it's a shared environment. – eg_dac May 08 '18 at 18:24