App_Data directory not published with Azure Mobile Services - azure

I have a few fonts and a PDF file in the App_Data directory of my Web API project which is published to an Azure Mobile Service.
The build action is set to Content and I can see in the output window that the files are being published but when my code runs it cannot find the directory anywhere.
Assembly.GetExecutingAssembly().Location
Yields
"D:\\local\\Temporary ASP.NET Files\\root\\aea53938\\87de4b2f\\assembly\\dl3\\fb538bd2\\f38b146c_6ea3d001\\
Both of these
HostingEnvironment.ApplicationPhysicalPath
HostingEnvironment.MapPath("~/")
Yield
C:\\Program Files (x86)\\SiteExtensions\\MobileServicesDotNet\\1.0.450\\
If I do a Directory.GetFiles() and Directory.GetDirectories() using the directories above, none of them show an App_Data folder.
Where is this mystery folder located? Several Stackoverflow posts have suggested looking in bin\App_Data but it's not there either.

Try D:\home\site\wwwroot\App_Data

Make sure, that in VS Publish --> Settings the exclude option for App_Data is not set.

Related

Azure App Service keeping old files at /home/site/wwwroot/

I'm deploying nodejs application to Azure App Service with visual studio code extension (Deploy to web app). However when I inspect the files section, I found some old file/ files from previous deployment are still exist at /home/site/wwwroot/ folder.
For example first deployment have A.js, and second deployment I renamed it to B.js, /home/site/wwwroot/ will endup with A.js and B.js.
How can I resolved this issue? Any suggestion will be appreciated, thank you!
on publish page click on show all settings.
Make sure Remove additional files at destination.
Before check Remove additional files at destination. showing old file on wwwroot folder.
After check Remove additional files at destination. showing old file on wwwroot folder.

Azure project - which subfolders/files should be checked into version control?

I am working on a small Azure project (using Visual Studio 2015). I have created a Azure Cloud service project with only one webjob. Inside the cloud service project, vs2015 created some subfolders like 'csx', 'ecf', 'XXXXXXXXContent', 'Profile', 'rcf'.
I wonder whether I should checkin these subfolders and the files inside. Of course, the 'Release' and 'Debug' folder inside these subfolders won't be checked in.
Folders with lowercases are generated during compilation and publish process.
csx: Packaged files which ready to be published. But as of Azure Tools v1.4, it is no longer generated unless you run in emulator. This blog post describes in detail.
rcf: which stands for Role Content Files. You already has ---WorkerRoleContent and rcf is generated through build configuration. You can think it as a kind of bin folder for contents.
ecf: It is generated folder for diagnostics settings depended on `diagnostics.wadcfgx' file. The file is specific for publish settings, so you should not include it in source control.
Overall, all three folders are automatically generated for publishing and they should not be added to source control.
However, Profile and ----Content folders are required to maintain your publish settings.

Is there a way I can publish an exe file to be in the same directory as an azure web job?

I have a web job that uses an exe that is best called when it is sitting in a directory and can be located. The problem is that I don't know how to get this exe to be published with the web job. I tried using a resources folder in the webjob project and copying them to output directory but that didn't upload them and so the only other option I can think of is uploading the files to a non temporary directory on the web site but that is leaking the encapsulation of the web job.
Any thoughts?
When you use visual studio to publish a webjob, it publishes all its dependencies as well. ie VS pushes all the dependencies available under the bin folder. So, add a reference to the dependent project and VS will take care of publishing this dependency as well.

Azure publish package not including all files

I have couple of config, dll and an exe file located in the bin folder and included in project. The files are set as Content and Copy Always.
When I debug the project locally, all works fine, the problem is when I publish the cloud service, the files are missing. The files are being omitted by the Azure publish process and are missing from the deployment package file.
How do I force the files to be included in the package?
This might be a duplicate of Windows Azure not generating aspx files
Here is a quote from that post that may offer a solution:
I've had a similar issue with deploying Spark ViewEngine files in an MVC3 app. Solution for me was to make sure the files were part of the project (see smarx answer), and to explicitly set the Build Action to Content for each file. – kenxl Mar 3 '11 at 9:09

Typescript .js.map files missing when publishing to azure

When I publish my web app to Azure website, using the Publish functionality in VS2012, none of the .js.map files are published with it.
What can I do to make sure those files are published to the server?
Make sure they are added to the solution. Use the show all files feature followed by add file feature in the solution explorer to do this

Resources