Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use Nuget for shared Views

I'm starting a new application that will share the same navigation bar (content at least) with other apps down the road. These will all be hosted on the same domain, but potentially different servers.

I know Nuget can be used to share libraries, but what's the potential use for it in sharing shared views, like a _SharedHeader, _Master pages. Each app would have to pull down the new nuget package and be redeployed to see a change in the navigation bar for example, but this code change is in one place versus in each app updating the _SharedHeader.

Are there other options that would be better? I'm not sure how sites in ISS inherit shared views, I've run into them sharing web.configs in virtual directories.

Is using one nuget package for shared views possible and a good idea, what are other possible reprocussions? My knowledge of nuget, mvc, and the relating subject matter is very rudimentary, but this seems like a good idea to manage code.

Thanks again.

like image 701
extraordin Avatar asked Apr 03 '13 16:04

extraordin


1 Answers

You can use NuGet packages to install pre defined shared views ( that would be used by multiple projects). Take a look @ http://docs.nuget.org/docs/creating-packages/configuration-file-and-source-code-transformations for more details.

like image 102
bhuvak MSFT Avatar answered Sep 21 '22 07:09

bhuvak MSFT