This project is read-only.

Automate Extract-Views

Nov 10, 2014 at 10:58 PM
Can you automate the Extract-Views function from the post build event?

I can run the Extract-Views function from the package manager console just fine, but when I try from the post build event it fails.
Nov 10, 2014 at 11:00 PM
No, currently it depends on some commands available only when executed from the Package Manager Console.
Nov 12, 2014 at 7:02 PM
Why do you need to run Extract-Views everytime you build? It doesn't sound right. You don't need to extract embedded views to use them, only to change/override them.
Nov 12, 2014 at 8:46 PM
Thanks for the replies, I have external assemblies with the views in those assemblies. As far as I am aware, if I make changes to the views in the assemblies then I need to run Extract-Views to move these views into the primary projects views folder. If I am developing - and constantly making changes to the views in the assemblies then I would need to run the Extract-Views every time to test the changes I have made. Also, if I can get it to run Extract-Views automatically, in the future or if another developer makes changes to the views code, then on a build it would move the views automatically - making life simpler. Please let me know if I have got the whole concept of how Extract-Views works. Thanks
Nov 12, 2014 at 9:39 PM
Embedded views don't need to be copied or extracted into the primary project to work. Try this: delete all the views you have extracted and run the app.
Marked as answer by maxtoroq on 11/12/2014 at 5:34 PM
Nov 12, 2014 at 10:50 PM
Excellent! That works great. I understand now. Thanks for the help. This plugin is excellent - this is how the 'out of the box' mvc should work. Good work!