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 am not sure where to share this idea, but I would love it if Umbraco could be setup to publish models to a private Nuget server. Then I could add and update my models in my project(s) using Nuget. I often have a few projects that would need references to my Umbraco models.
I suppose git would work as well.
Has anyone thought about this or tried it?
What Models Builder mode are you using? Also, how many steps would be acceptable for you to achieve this?
I'm using Dll mode. It would be great if you could configure your Nuget server info in the back office and then just click a button and your Nuget package is updated. Then you just update in the packages in your Visual Studio projects. Make sense?
Are all your umbraco sites 100% identical?
I haven't worked on sites that share anything other than property editors.
No, I don't mean that I would share the generate models between different sites, but rather between different projects for the same site. I often use at least two projects for each website: one class library to hold my custom controllers, models, etc. and the website. So it'd be easier to keep these in-sync.
how about just generating them in another project?
Set Umbraco.ModelsBuilder.AcceptUnsafeModelsDirectory to true, change the Umbraco.ModelsBuilder.ModelsNamespace to fit your project, and point Umbraco.ModelsBuilder.ModelsDirectory to a folder in your project.
Well, that might work but as I'm generating the models (in Dll mode) on the remote server, I thought it would be convenient to update them on my development machine, all the projects in one go. Granted, it's usually just two projects...
So basically, I'm suggesting a model builder that publishes to a remote code repository that can then be referenced in Visual Studio. With that setup, your suggestion would work perfectly.
I have never heard of a workflow like that.
Do you download the generated modelfiles?
What happens if you make changes to doctypes locally?
Yes, I download the generated models. I don't change the doctypes locally once a project is deployed. I would regenerate them on the server then update the Dll in my project(s).
I really think you should follow a more “normal” workflow, wich allows you to benefit from the features the tools provide you :-)
But, you could always have Umbraco ship the generated file to Git, and then setup a CI/CD that builds/publishes a DLL that you can use.
I just really think it would be much more simple to just use modelsbuilder on your local machine, and then push changes when they are ready.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted