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.
Not really an answer but one thing you may want to check if the files are included in the package itself. Essentially the package file (
*.cspkg
) is a zip file. What you can do is change the extension of the file fromcspkg
tozip
and extract that file.Once you extract the zip file, you will see files with
cssx
extension for each of your roles. Change the extension of those tozip
as well and unzip those files.If everything's configured well, you should be able to see those files in appropriate directory. If the files are not there, that means there's something wrong (obviously). What you could try in that case is change
Copy to output directory
toCopy Always
instead ofCopy if newer
setting that you currently have.