Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7913637
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:53:34+00:00 2026-06-03T13:53:34+00:00

I have a visual studio solution with multiple telerik MVC4 razor projects having same

  • 0

I have a visual studio solution with multiple telerik MVC4 razor projects having same look and feel. I don’t want to have same layout, CSS/styles, images and js files copied in all MVC4 projects. What is the best way to accomplish this re-usability? I tried creating a virtual directory of a commonUI project and tried to refer _layout.cshtml using http://localhost/… in _ViewStart.cshtml but it complained saying “http:/localhost/MyMvcApp/Views/Shared/_Layout.cshtml’ is not a valid virtual path.”

Please help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T13:53:35+00:00Added an answer on June 3, 2026 at 1:53 pm

    Four recommendations:

    1) Look into areas, maybe instead of having separate projects these are really different components of the same system (admin, etc.)?

    2) Use add existing item in visual studio and add the items via links. This still duplicates them for deployment, but you can keep one source.

    3) Consider doing this by building your own nuget package. That way although you would copy the CSS and images you would have it packaged up and could update the package as needed. The benefit is that you can update one project while not having to re-test the other (if they are separate and 1) doesn’t apply).

    4) I find this one uglier than the rest, but in IIS I believe you can map in folders, so you could refer to these files by links in your project, not deploy them there and then map in the appropriate folder at deployment time using a single source path.

    I know of no way to share up the application path.

    EDIT:

    I have never tried this before, so can’t vouch for it working, but maybe compile your shared items in a separate project and then reference the DLL in all other projects.

    The reference I found is this, but again, I haven’t confirmed that this works, just think this could be a viable path to explore:

    http://www.chrisvandesteeg.nl/2010/11/22/embedding-pre-compiled-razor-views-in-your-dll/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a visual studio 2008 solution with multiple c# library projects, a Web
I have a Visual Studio 2010 solution that contains multiple projects. One of these
I have multiple C# projects in a Visual Studio solution right now that will
I have a Visual Studio solution consisting of multiple projects. In one of the
I have a solution in Visual Studio 2008 which has multiple projects. One of
I have a Visual Studio solution with multiple projects. I am not 100% settled
We have a Visual Studio solution that comprises multiple production and test projects. The
I have multiple projects in a single Visual Studio (2008) solution. I just discovered
I'm using Visual Studio 2008 and I have a solution which contains multiple projects.
I have a solution in Visual Studio 2010 which contains multiple projects. All of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.