2
votes

I've created an Umbraco project locally following instructions from here:

https://our.umbraco.org/documentation/using-umbraco/creating-basic-site/

  • VS version: VS 2013 Pro
  • Umbraco version is 7.2.1
  • SQL version: SQL Server 2008 r2

All working fine locally, created master template, some page templates and some content. Now I would like to push the site live, both layout and content, using an Azure Website. I created the SQL DB on Azure using the app from:

https://sqlazuremw.codeplex.com/

I've verified the DB looks correct by doing a Schema compare and Data compare through VS SQL Server Object Explorer.

I published the site via VS 2013, right click project, publish, Azure Web Site and all went through as expected.

Problem

When trying to view the site it's just returning a blank page, no HTML in the source. Looking at the files which have been uploaded to Azure, it appears that some files from the Views directory weren't uploaded e.g. ContentMain.cshtml, Homepage.cshtml, Master.cshtml.

Looking at my local project source, none of those files are included in the project i.e. the icon has a dotted outline. Presumably this is something to do with the fact they were originally created via the browser?

Is it expected that those files aren't supposed to be part of the project and therefore aren't included when publishing to Azure?

I'm guessing that it would work fine if I simply right click and include each of the files then re-deploy. However I don't want to cause some other issue in Umbraco by doing so.

What is the best practice advice to get round this?

Cheers, Lee

1

1 Answers

1
votes

Is it expected that those files aren't supposed to be part of the project and therefore aren't included when publishing to Azure?

I'm guessing that it would work fine if I simply right click and include each of the files then re-deploy.

I think it's correct. Templates created by Umbraco back-office are not included automatically in Visual Studio Project and VS cannot publish items not included in project.

A better approach is to create your templates directly in your VS Project.