I´m new to umbraco, and have been looking in to "best practice", and recommendations regarding Visual Studio and version control.
Right now it seems like the best solution for me is keep models and surfacecontrollers in a seperat project, and deploy the output the umbraco website on IIS.
I found the .Core NuGet package for this scenario, but i´m not sure how to reference and use this .dll on the site. I guess i have to reference the .dll, but from there i´m not sure how to do.
Is it enough that the dlls are copied? What i dont understand is how the umbraco installation knows how to load the controllers in my copied dll, instead of the original ones.
Are there not some way i have to tell umbraco to use the controllers namespace in my custom dll?
How to manage/use code in seperat project
Hi,
I´m new to umbraco, and have been looking in to "best practice", and recommendations regarding Visual Studio and version control.
Right now it seems like the best solution for me is keep models and surfacecontrollers in a seperat project, and deploy the output the umbraco website on IIS.
I found the .Core NuGet package for this scenario, but i´m not sure how to reference and use this .dll on the site. I guess i have to reference the .dll, but from there i´m not sure how to do.
Any "beginner" advice would be appreciated.
Hi Torben,
if you use the nuget packages you can just install the core package in your seperate project.
The main website project has also the Core DLL when you install umbraco by nuget.
During publishing VS takes care that all dlls are shipped.
Regards David
Hi David,
Thanks for the fast reply.
Is it enough that the dlls are copied? What i dont understand is how the umbraco installation knows how to load the controllers in my copied dll, instead of the original ones.
Are there not some way i have to tell umbraco to use the controllers namespace in my custom dll?
Hi Torben, I usually create two ASP.NET Web Application with the MVC references, in my main project I install Umbraco with nuget:
In my other web application where I store my controllers and other classes I install the Umbraco Core package with nuget.
In my main project I add a reference to the other project and then everything will work automatically, no other changes are required.
// Herman
Hi Torben,
because you inherit from the build in umbraco controller, it will automatically pick them up during start of the web application.
There is nothing you have to manually register.
Think it does that by reflection.
Regards David
Thanks for the answers - as you all hinted, it just works!
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.