简体   繁体   中英

Solution items cross several web projects in Visual Studio

I have two web projects, both these projects share client-side JavaScript currently residing as almost identical copies in both projects. I say almost because I'm clearly having versioning problems with these files.

I've managed to put the files in a solution folder and created links to them from my projects and this works when I publish the projects. However, when I run the WebDev server locally these files are not hard file system links? They seem to be maintained within the Visual Studio project as a reference only.

The problem is that the WebDev server will make a request to the presumable valid location of the file but it will not find it there because it doesn't exist as a physical file at that location.

Anyone know how to work around this?

If you use SVN, you could have the files managed as externals. Basically this will allow you to have the shared files maintained in one location, and have an external (physical file) reference to them.

http://svnbook.red-bean.com/en/1.0/ch07s03.html

Dave the Ninja

Here is a post that can help you :

Using Linked Files with Web Application Projects

http://consultingblogs.emc.com/jamesdawson/archive/2008/06/03/using-linked-files-with-web-application-projects.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM