Jump to content

Wikipedia:Reference desk/Archives/Computing/2019 October 22

From Wikipedia, the free encyclopedia
Computing desk
< October 21 << Sep | October | Nov >> October 23 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


October 22

[edit]

Sharing JavaScript / CSS files between projects in Visual Studio?

[edit]

I am using Microsoft Visual Studio 2015 at work to develop an ASP.NET Core web application in C#, using JavaScript and CSS on the browser side.

Here's the thing. The system is actually a solution consisting of two separate ASP.NET Core web application projects, both in C#, using JavaScript and CSS. One of the projects has a fully working set of JavaScript and CSS files in the wwwroot folder. I'd like to use the same files in another project, but haven't found a way to refer to the files directly across projects so I could reuse them. In the end I resorted to copy-pasting the files as separate copies, but it would be easier to maintain if there were direct file references. Is this possible? JIP | Talk 20:01, 22 October 2019 (UTC)[reply]

The usual term for this is a library. Try searching for that term in their help files or online. SinisterLefty (talk) 20:09, 22 October 2019 (UTC)[reply]
Does this mean I can make my own library? Note that the JavaScript and CSS files in question are the company's own proprietary code, which I can use in source code form, but can't be published publicly online. JIP | Talk 21:19, 22 October 2019 (UTC)[reply]
Well, unless you actually intend to change them, the copy-and-paste method should be fine. If you do intend to change them, that's when you need to find a way to set up a library (you should also change the name to avoid confusion with their version). I don't know what native capabilities they have to set up a library, but if they don't support that, you could also do so yourself, by maintaining an outside folder with those files, making any changes there, then copy-and-pasting to the project(s) when any change is made. (You'd need to keep a list of which files are used in which projects in that folder, too.) SinisterLefty (talk) 21:49, 22 October 2019 (UTC)[reply]