modelsbuilder / ModelsBuilder.Original

The Community Models Builder for Umbraco
MIT License
114 stars 49 forks source link

Change the location of generated classes get created to. #119

Closed nadiamac closed 8 years ago

nadiamac commented 8 years ago

Is it possible to set a different location the classes get generated to?

ie if we want our models in a separate project we have to remember to copy and paste them, it would be good if we could specify the location

zpbd commented 8 years ago

Took me ages to find this as it's not in the docs as far as I know. You should be able to do this:

    <add key="Umbraco.ModelsBuilder.AcceptUnsafeModelsDirectory" value="True" />
    <add key="Umbraco.ModelsBuilder.ModelsDirectory" value="~/../SomeOtherProject/Models/Whatever/Generated" />

You need AcceptUnsafeModelsDirectory to go up the tree and outside of the website project folder.

zpqrtbnk commented 8 years ago

Have added it to the doc. Thanks.