Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git Azure deployment missing files from content directory (MVC4 project)

Tags:

git

azure

I've been pushing from a local git repository to azure with no problems.

However, since adding some static content(a few png files) and pushing them to azure, I've noticed that they aren't getting pushed into the wwwroot directory on azure.

The files are being tracked by git and are landing in the git repo on the azure server. I was able to verify this by connecting by ftp and browsing folders.

However if I browse by ftp to the wwwroot directory, I can see that my new files have not been copied to this directory.

NOTE: I had two nice screenshots showing the files in one directory but not the other but I unfortunately can't post images on here as I'm a new user.

So to confirm:

  • I've added a new file - test.png into /Content/images
  • test.png is being tracked by git.
  • test.png has reached the azure servers as I can see it when ftping to the /repository/ProjectName/Content/images directory
  • test.png is not being copied into the wwwroot/Content/images directory, and is therefore not appearing on my azure website

The build action on these images is the same as other images which are appearing in the wwwroot directory (Content, Do not copy).

How can I get my new static resources to get copied into the wwwroot directory when pushing to azure?

like image 436
Ed Spencer Avatar asked Jan 27 '13 18:01

Ed Spencer


2 Answers

The most common reason for this issue is that the files in the Project and not correctly marked as Content, causing them not to be deployed. When that's the case, you'd see the same behavior when deploying via WebDeploy.

If you see this behavior and your files are correctly marked as Content, then I'd love to see a repro, ideally in the form of a github repo that I can try pushing myself to Azure.

like image 175
David Ebbo Avatar answered Nov 03 '22 21:11

David Ebbo


Build solution before commit to git to fix it.

like image 2
usernike80 Avatar answered Nov 03 '22 22:11

usernike80