Here is what I would recommend:
Right-click on the solution and create a new solutions folder called Common Javascript Files (or whatever you want to name.


Right-click on Solution, select Open Folder in Windows Explorer, or go there manually for other versions of Visual Studio: (

In the solutions directory, create a directory with the same name as the solution folder (solution folders usually do not match the directories at the source code level, but this will be useful for the sled).

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

In Visual Studio, select the solutions folder and select Add - Existing Item.

In the file selection dialog box, go to the directory created earlier, select the files added to the directory, and click "Add."


In each project that requires a shared file, right-click the project (or directory in the project) and click Add - Existing Item.

Go to the shared directory, select the files and click the drop-down arrow , then click "Add as link."

Now files in projects are significantly reduced to files in the Solution folder. But they are considered as actual files in the project (including .CS or Visual Basic files, they will be compiled as files that really exist in the project).

PROFI
- Files truly available for various projects during development
- You can add only the files needed for each project, itโs not all or nothing.
- No configuration required in IIS (virtual directory, etc.)
- If the solution is in the TFS Source control, you can add the directory to the TFS source and the shared files will be controlled by the source code.
- Editing a file by selecting it in the project will edit the actual file.
- Deleting a linked file does not delete the file.
- These are not only JS files, related files can be ANY file you may need (images, Css, Xml, CS, CSHTML, etc.)
Cons
- Each deployment gets its own file.
- There is a small learning curve with the understanding that solution folders are not directories that exist in the solution catalog.
Erik Philips Dec 17 2018-11-12T00: 00Z
source share