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 6951665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:14:55+00:00 2026-05-27T14:14:55+00:00

In case the question wasn’t clear. I have 3 MVC projects in one Solution.

  • 0

In case the question wasn’t clear. I have 3 MVC projects in one Solution. Every time I create a new project it adds the “Scripts” folder with all the .js files I’ll ever need. I don’t want to have this created every time for every application. Is there a way to reference scripts from a central folder in the solution so all applications/projects can share one common script folder with all the scripts common among them?

Edit:
Please explain the pros and cons of doing this if there are any…now I’m curious.

  • 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-05-27T14:14:56+00:00Added an answer on May 27, 2026 at 2:14 pm

    Here is what I would recommend:

    Right click the solution and create a New Solution Folder called Common Javascript Files (or whatever you feel like calling it.

    New Solution Folder

    Common Javascript Files Solution Folder

    Right click on the Solution, click Open Folder in Windows Explorer,
    or navigate there manually for other versions of Visual Studio 🙁

    Open Folder In Windows Explorer

    In the solution directory, create a directory with the same name as the solution folder (solution folders do not normally match directories at the source code level but this will for sanity sake).

    Common Javascript Files Directory

    In this new directory, add files that need to be shared between solutions.

    Add Javascript Files To Directory

    In Visual Studio, click the solution folder and select Add – Existing Item.

    Visual Studio Add - Existing Itme

    In the file selection dialog, navigate to the directory previous created, select the file(s) added to the directory and click Add.

    Select Files To Add

    Solution Folder Files

    In each Project that needs a shared file, right click on the project (or directory within the project) and click Add – Existing Item.

    Project Add Existing Item

    Navigate to the shared Directory, Select the files and click the drop down arrow then click Add As Link.

    Add As Link

    Now the files in the projects are essentially short cuts to the files in the Solution Folder. But they are treated as actual files in the project (this includes .CS or Visual Basic files, they will be compiled as files that actually exist in the project).

    Linked Files

    PROS

    • Files are truly shared across projects at Design time
    • Only the files needed for each project can be added, it’s not all or nothing
    • Does not require any configuration in IIS (virtual directory etc)
    • If the solution is in TFS Source control, you can add the Directory to the TFS Source and the shared files will be source controlled.
    • Editing a file by selecting it in the Project, will edit the actual file.
    • Deleting a Linked file does not delete the file.
    • This is not limited to JS files, linked files can be ANY file you might need (Images, Css, Xml, CS, CSHTML, etc)

    CONS

    • Each deployment gets it’s own file.
    • There is a small learning curve when understanding that Solution Folders are not Directories that exist in a Solution Directory.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wasn't clear how to correctly name this question. Case 1 Assume that I
I have a simple unit test case (extensive question here ) on a configuration
I have a specific case in mind, but the question applies in general too.
This is a general question about MVC as a pattern, but in this case
I know it is a strange question did someone have had a case where
I've heavily edited this question because responses indicated I wasn't being clear problem: UI
I have a solution in Visual Studio. It contains about 500 projects. When I
Ok so I edited the question because it wasn't clear enough. Edit 2 :
Overflow :3 I've got a kind of hard-case question. So I'll try clearly explain
In this case the license is question is Apache License v2, but basically if

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.