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
Right so Im trying to set up my models builder on my new project.
I have a .Web and .Core project in my solution, I have installed
(Install-Package UmbracoCms.Core, Install-Package Umbraco.ModelsBuilder, Install-Package Umbraco.ModelsBuilder.Api) NuGet packages.
And I have also created a class of ModelsBuilder.cs and added the custom tool property of - "UmbracoModelsBuilder"
And Configured my tools options with ( URL + UserName + Password )but when i try to run my custom tool I get the error of ("one or more problems with model builder")
STEP BY STEP GUIDE: https://www.umbrajobs.com/blog/posts/2020/july/get-up-and-running-with-umbraco-8-modelbuilder-api/ **
Actually I had a load of trouble with that.
You have to take it step by step.
I read a few blog articles and each had their own problems.
From memory here are the steps I took.
So I usually have two projects. I am guessing you have the same too since wanting to use the ModelsBuilder API. I have a .Web project that contains all the Umbraco stuff. I am then have a .Core project that has all the custom .net stuff.
Here are the steps.
Install Umbraco.ModelsBuilder.Api nuget package on the .Web project.
Install-Package Umbraco.ModelsBuilder.Api -Version 8.1.0
Edit your web config with the following.
<add key="Umbraco.ModelsBuilder.Enable" value="true"/>
<add key="Umbraco.ModelsBuilder.ModelsMode" value="Nothing"/>
<add key="Umbraco.ModelsBuilder.EnableApi" value="true"/>
Make sure your .Core project has UmrbacoCMS.Core installed. This can also be done through nuget.
Make sure your .Core project has a reference to Umbraco.Web dll. I usually reference this from the web project.
Make sure your .Web project is referencing your .Core project.
Build and run. I usually 90% of the time get an error here. Something complaining about the System.ValueTuple references in the Core and Web projects are not the same. If you get this it's an easy fix. Open up Nuget package manager and check the versions of System.ValueTuple on both the .Core and .Web projects. My guess is the .Web will be 4.3 and the .Core project will be 4.5. To fix this I simply upgraded the .Web to 4.5 and I haven't seen any issues doing this.
Once the project is running. You then need to installed Umbraco.ModelsBuilder to the .Core project using nuget.
You then need to installed Umbraco.ModelsBuilder.Api to your .Core project using nuget.
Build and run. Hopefully this will work.
Now you need to make sure the ModelBuilder tool is installed into Visual Studio.
Once this is installed you need to enter the domain name, Umbraco Username and password into the Custom Tool setting.
You then need to add a class called ModelsBuilder.cs to your core project. There is some visual studios properties you need to add. Right click on the class in visual studio. Click properties, in the Custom Tool field type UmbracoModelsBuilder.
Once all this is done you can right click on the class and click run custom tool.
This should work. If not I would revisit all the steps and make sure you haven't missed anything.
If you follow these steps and also watch Paul's video to fill in any blanks you will be fine.
It takes some getting up and running but well worth it in the long run.
Sorted it. :)
Great. Hope that helped.
For others with similar problems:
I had no luck with "Umbraco ModelsBuilder Extension" (v8.1.5). I always received "Cannot find custom tool..." error in Visual Studio.
After I installed "Umbraco ModelsBuilder Custom Tool" (v8.0.5), everything workd fine.
What's the difference between the two extensions?
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted