How Do i generate Models For Models Builder if i can not build the site due to Models being referenced in code such as controllers and Helpers (.cs files)?
The website is not running anywhere and can not be run until i have the models. i seem to have to in to this situation converting from LiveDLL that seems to be deprecated too LiveAppData.
As such there is nothing in My App_data/Models folder and no DLL built. so my code will never compile now. and i don't know how to hit the database to generate the models without the code running.
You can setup a new umbraco website. Then couple the database that you already have. Changing the connection string. Then create models with LiveAppData.
That should work:
step 1: Install Clean Umbraco
step 2: Change connection string to database with the models and stuff.
step 3: Regenerate models.
Didn't think of that makes sense if not a bit cumbersome.
I guess a project without its models wouldn't work regardless of whether it was Umbraco or not. its just a confusing way to work having the models generated through the db.
Especially when it defaults in the App_Data which we usually don't commit
After thinking about it my problem stems from the fact im working with 2 Databases that connect to the same Umbraco Code.
Database A is an upgrade of B with altered Document and DataTypes, when i Connect to Database B Umbraco Generated Models will no longer match the code base. Im pretty sure in that case my solution is to change from LiveAppData too AppData so i dont overwrite the working models for the code until i migrate the Umbraco Document and DataTypes in B to match A.
ModelsBuilder First run visual studio
How Do i generate Models For Models Builder if i can not build the site due to Models being referenced in code such as controllers and Helpers (.cs files)?
If you have the website running you can change the config using LiveAppData. This way you can generate the models trough umbraco.
Default the models will be saved .
~/App_Data/Models
https://our.umbraco.com/documentation/reference/templating/modelsbuilder/Builder-Modes
The website is not running anywhere and can not be run until i have the models. i seem to have to in to this situation converting from LiveDLL that seems to be deprecated too LiveAppData.
As such there is nothing in My App_data/Models folder and no DLL built. so my code will never compile now. and i don't know how to hit the database to generate the models without the code running.
You can setup a new umbraco website. Then couple the database that you already have. Changing the connection string. Then create models with LiveAppData.
That should work:
step 1: Install Clean Umbraco step 2: Change connection string to database with the models and stuff. step 3: Regenerate models.
Didn't think of that makes sense if not a bit cumbersome. I guess a project without its models wouldn't work regardless of whether it was Umbraco or not. its just a confusing way to work having the models generated through the db.
Especially when it defaults in the App_Data which we usually don't commit
Let me know if you get it to work:)
I believe it will work.
After thinking about it my problem stems from the fact im working with 2 Databases that connect to the same Umbraco Code.
Database A is an upgrade of B with altered Document and DataTypes, when i Connect to Database B Umbraco Generated Models will no longer match the code base. Im pretty sure in that case my solution is to change from LiveAppData too AppData so i dont overwrite the working models for the code until i migrate the Umbraco Document and DataTypes in B to match A.
is working on a reply...