I have Azure Cloud Service project that written in C#. This project is contain Azure Worker Role.
My Worker Role is reference another project (in same solution) that hold a directory in it. In this directory there are 10 HTML files. All those files are marked with those settings (file settings):
Build Action: Content
Copy to output directory: Copy if newer
I build my worker role and those content files are located on this path: bin/release/my-files/ dir. So, my project configuration is looking good.
I publish my azure cloud service to Azure, and the content files not being uploaded. I verified that by connecting with remote desktop to the machine and check this path: "E:\approot". my content files are not there.
What should I do in order to upload those content files?
Update
Thanks for @Gaurav_Mantri comment, I've check the CSSX file and my content files are missing there. No I not wondering that my azure worker role is missing too after publish.
I also tried to change "Copy to output directory -> Copy always". Same result.
General guidance is to avoid local file system interaction in cloud services and PaaS whenever possible, as (among other things) it requires you to duplicate your content on every VM in your solution (not necessarily a trivial task in the face of auto-scaling, etc.). You have a few options in Azure:
Azure Files let you interact with files and folders from a central location, as a network share:
Azure File Storage
You can always read and write files directly from Azure blobs:
Azure Blob storage
If your HTML content files are public facing and receive a more-than-small amount of traffic, you might also consider using the Azure CDN service to host them:
Azure CDN
Good luck!