Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm new to Umbraco.
I've tried to install Umbraco several times from NuGet in Visual Studio. There are no errors but it seems like most of the solution is missing. I only get the 'Config' and 'Views' folder, all other folders are missing.
I can run it however... Seems to work ok, I just can't develop anything without the directories available in Visual Studio. I started using VS2015, but also in VS2013 and VS2013 with 2012 template no luck. Even tried an older version of Umbraco (newest right now is 7.2.8).
What am I doing wrong here?
I used VS2015 to set up Umbraco in Azure. Besides the missing folders, everything went well. I had to set up Umbraco locally and pointed it to the Azure database. Deployed it to Azure, no errors. Funny thing here is that locally, both front view and admin panel are working fine, but in Azure, only the admin panel works, the website on the front is empty. I guess setting up Umbraco locally before (being able to) deploy it to Azure causes a problem in the link between admin panel and front end.
Any idea where I can find that setting and/or how to solve this problem?
The "missing folders" are copied into the project folder when you build the first time. They aren't included in the project (so they're hidden in VS), because that could lead to source control messes, modified core files and whatnot.
If you did everything right (Create empty ASP.NET site, install-package UmbracoCms), then you should be able to start (with/without debugging), complete the web-based install-wizard and deploy (like you probably did).
The reason your online front-end is empty is that Umbraco uses a caching mechanism that is local to each deployment. In the backoffice, navigate to the root content item, right click it and select publish. Include all children, and you're good to go. :)
If nothing is included in VS, how can I upload/develop my own stuff using VS?
I don't like the backoffice of Umbraco to work with, because I have a lot of stuff to upload and in the backoffice I have to create empty files (CSS/JS) and copy my code into them. Very time consuming... There must be an easier way right?
Unfortunately, the front end is still empty after publishing from backoffice in Azure. It appears that a lot of stuff wasn't deployed. Probably because it isn't included in VS?
Chantal, it sounds like you are able to run umbraco site at least? If you are, you definitely have the umbraco and umbraco_client directories you will need (even if you don't see them, yet). Try this:
This will let you see all of the files in the solution folder even if they aren't included in the solution. I always keep "Show All Files" checked. You do not need to and should not include all of these files in the solution. These are the folders that I like to include in the solution:
It is likely that you have more folders you should include as well. Anything that needs to be compiled into a dll or that you want intellisense for should probably be in the solution. For example, if you have these folders, they should also be in the solution:
But I wouldn't put these in the solution
One final question, how did you deploy the files to Azure? Did you do a "Publish" through visual studio? I can't remember for sure (I don't often publish through visual studio), but I wonder if the "Publish" only deploys the files in the solution and not all of the files that have been excluded? My instincts are telling me that if the files aren't part of the solution, they aren't part of the "Publish" deploy. One thing you can do is right click on the project you are publishing and click "Properties". Navigate to "Package/Publish Web". In this tab, you can configure the publish to deploy all of the files in the solution or all of the files in the solution folder. Try clicking "All files in the project folder". and then publishing again.
The down side of this is that all of your caches and TEMP files inside of the App_Data directory as well as media (which might be test media?) will get deployed to Azure. There are ways to go into the .csproj and add some xml, so that those directories are ignored, but it isn't very fun, and doesn't feel like the right way to do it to me. I did this for one project one time, and this is what the portion of the csproj that I modified it looked like:
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
I hope some of that helps get you up and running. Let me know if you have any questions.
I'm sorry if I'm duping Marks answer, but it's just too long. ;)
I forgot to mention that the same magic that copies the files when you build also copies the files to the staging area on disk when you do a one-click-publish. It doesn't matter whether this is to disk, ftp or using web publish to Azure.
As long as you have the backoffice online after you've published, you should just republish and you're good to go. No need to deploy any "missing files" manually.
When you say "deploy", what did you actually do?
I have an update :-)
I misunderstood the process of publishing (that was wat I meant by deploy) to Azure. I got an error in VS that the connection string could not be empty and publishing therefore had failed. So I ran Umbraco locally to set it up.
That was the wrong thing to do. The right thing to do is just ignore that error message in VS because it actually did publish everything you need to set up Umbraco on Azure. The connection string is indeed empty because the database connection isn't set at the moment, that is what Umbraco does itself when you set it up (by navigating to the website for the first time).
So my second attempt I navigated to my Azure website and did the Umbraco set up. Result is a perfectly fine working Umbraco starter website. Front end is also fine now.
What remains is that I still don't have the newly generated files/folders. The files that were generated at setting up Umbraco were (not surprisingly) not generated in my local solution. This means I still can't upload and develop my own files.
Is there any way to get the excisting files/folders from Azure into VS at this stage?
If not, can I just create the excisting folders in my VS solution myself? Will the newly added content of these folders be placed in de excisting folders on Azure if I publish from VS?
I must admit I'm surprised how difficult it is to use VS to develop...
The last idea that crosses my mind is to set up the starter website locally (so all files and folders are generated in my solution and I could use Mark's answer to put the files/folders into VS), then deploy it to Azure and then start editing. This just seems very complicated to me because that would mean I have to start with a local database and migrate that to Azure SQL... and I'm not sure whether my empty-front-end-issue will reoccur...
What I usually do is set up the site locally and include whatever's generated within Views and Css in the Visual Studio project. Those will be published with the project when you deploy. (Probably more stuff, refer to Mark's post)
Whatever's in the App_Data folder though is supposed to be local to each "instance" of your site.
However, you can also right-click any file in your project folder (remember to show invisible files like Mark explains), and either replace them with the server version or publish the individual file to the live site.
When I set up Umbraco, I point to the database in the cloud (remember to add a firewall in the azure management portal). When publishing, I use the same connection string.
That makes my dev environment and production (or staging environment) use the same database, and I just have to use the "publish" function in the backoffice to refresh the cache whenever I've made content locally or live.
Umbraco Courier is getting good at syncing content between staging and live environments, but there's also other alternatives like RedGate SQL Compare and others.
I can understand you find it daunting if you're new to both Visual Studio and Umbraco, but believe me, I've tried other environments, and I'll never swap. :)
Sorry for my late response...
Thank you both for your help!
I finally figured it out :-)
I'm not completely new to VS, but I'm surprised how little I know about it!
It was pretty difficult for an Umbraco newbe and therefore I will document the steps and post it when I'm finished. May help others to figure it out a little faster than I did :-)
Could you post your process or link to it please?
Thanks for the info on here. I couldn't see most of my project files in VS but the 'Show All Files' icon did the job. I don't know why they just don't all show as default. It's plain crazy.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted