Azure publish package not including all files - azure

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

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.

Visual studio continuous deployment of a Webapp does not work

I cannot deploy using the build created by the integration between Azure and VSO.
The build finishes correctly, but it is not deployed on the website! The bin folder is there. But there is no folder for the views!
I have the impression it started when I create an webjob in the solution.
I cannot publish it neither!
Thank you
It's possible you're actually publishing the web job (is the project just a console app?) to the webapp, instead of the web project.
(Side note, this is one way to get a web job deployed and running)
You can control which project in your solution is being deployed by adding a new setting under "app settings" on the "configure" tab for the webapp.
The setting you want is Project and it's a relative path from the solution root to the .csproj file of your web project.
Alternatively, you can specify the setting in a custom .deployment file.
Relevant Kudu documentation here
From the documentation:
You can specify the full path to the project file. Note that this is not a path to the solution file (.sln), but to the project file (.csproj/.vbproj). The reason for this is that Kudu only builds the minimal dependency tree for this project, and avoids building unrelated projects in the solution that are not needed by the web project.
Here is an example:
[config]
project = WebProject/WebProject.csproj

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.

Include/Exclude files when creating Azure package

I am creating an azure package using Visual Studio (right click on azure project -> package). I would like to include and exclude some files in the package similar to this: How do you include additional files using VS2010 web deployment packages? What do I need to do to get this working for the azure package function?
Windows Azure deployment package (CSPKG) file is different then regular VS publish package even though CSPKG file is actually a zip file. You can rename CSPKG to zip and see what is inside however you can not add or delete files this way as your package will be corrupt.
The best way to add files to your CSPKG is to add those files in your VS project and then in those file properties set "copy local as true" means add these files to final output. This way when you build the CSPKG the files will be there.

Resources