It is my first Umbraco Cloud solution and apparently I am facing problems everyday :)
I like to have some user specific data separated from the Umbraco and therefore I like to have them on a separated database on Azure.
To do so, I've created my models and context on the core project, then on package manager console I've selected my core project and wrote "Enable-Migrations" .
Then an error came up saying
The project 'xxx.Web' failed to build.
And on the "Error List" pan I can see some build errors related to Umbraco folder, like:
Error CS1061 'IPublishedContent' does not contain a definition for 'Ancestors' and no extension method 'Ancestors' accepting a first argument of type 'IPublishedContent' could be found (are you missing a using directive or an assembly reference?) 2UmbracoPartialViewMacrosTemplatesBreadcrumb.cshtml
What is the solution? Am I following the right approach?
I've not tried it myself, but I believe you would need an externally hosted database. I don't believe it is possible to add another database into the Umbraco Cloud instance, however you could try asking Umbraco Support via your cloud portal. They might be able to give you some pointers?
Hi Nik,
I have my database in Azure and I can connect to it with a normal .net project.
The problem is that the UaaS generated code has compile errors that prevents EF- code first from generating migrations ππ
Have you added a reference to Entity Framework to the Web project? Because the Core project requires it, you'll probably need to add it to the Web one as well.
Do you have a full list of all of the errors you are getting? It can be a case that some of the errors are "false" errors.
Hmm. I've just added it to coreπ€.
My errors are Umbraco views (not mine π ) that live under folders other than view, so they don't understand normal web.config namespaces.
So it doesn't recognize Image as a type, or some extention methods for IPublishedContent.
I will try adding EF to web the first thing in the morning
When you say they are "umbraco views" where exactly are these views? Are they located under the Views folder?
Looking at your error message it looks like they are located under Views -> MacroPartials is that correct?
You mention this is an Umbraco Cloud project, does the version in the cloud work at the moment? If so, it might be easier to re-clone the web project and see if that resolves the issue?
EF code first with the cloud solution
Hi,
It is my first Umbraco Cloud solution and apparently I am facing problems everyday :)
I like to have some user specific data separated from the Umbraco and therefore I like to have them on a separated database on Azure.
To do so, I've created my models and context on the core project, then on package manager console I've selected my core project and wrote "Enable-Migrations" .
Then an error came up saying The project 'xxx.Web' failed to build.
And on the "Error List" pan I can see some build errors related to Umbraco folder, like:
Error CS1061 'IPublishedContent' does not contain a definition for 'Ancestors' and no extension method 'Ancestors' accepting a first argument of type 'IPublishedContent' could be found (are you missing a using directive or an assembly reference?) 2UmbracoPartialViewMacrosTemplatesBreadcrumb.cshtml
What is the solution? Am I following the right approach?
Has anyone solved the problem? How would you connect to an external DB while you are working with UaaS?! Is it impossible?!
Hi Ashkan,
I've not tried it myself, but I believe you would need an externally hosted database. I don't believe it is possible to add another database into the Umbraco Cloud instance, however you could try asking Umbraco Support via your cloud portal. They might be able to give you some pointers?
Nik
Hi Nik, I have my database in Azure and I can connect to it with a normal .net project. The problem is that the UaaS generated code has compile errors that prevents EF- code first from generating migrations ππ
Hi Ashkan,
Have you added a reference to Entity Framework to the Web project? Because the Core project requires it, you'll probably need to add it to the Web one as well.
Do you have a full list of all of the errors you are getting? It can be a case that some of the errors are "false" errors.
Nik, I've checked it. It simply doesn't work. :(
Hmm. I've just added it to coreπ€. My errors are Umbraco views (not mine π ) that live under folders other than view, so they don't understand normal web.config namespaces. So it doesn't recognize Image as a type, or some extention methods for IPublishedContent. I will try adding EF to web the first thing in the morning
Hi Ashkan,
When you say they are "umbraco views" where exactly are these views? Are they located under the Views folder?
Looking at your error message it looks like they are located under Views -> MacroPartials is that correct?
You mention this is an Umbraco Cloud project, does the version in the cloud work at the moment? If so, it might be easier to re-clone the web project and see if that resolves the issue?
is working on a reply...