Well as the title says i have 2 web projects that have the same css files, master page and some resource files, how could i share those? atm i have 2 copies of them…
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
Solution 1: bind them into separate assemblies in share it across your projects.
Reference:
- Building Re-Usable ASP.NET User Control and Page Libraries with Visual Studio 2005
- How to embed resources in ASP.NET 2.0 assemblies
Method 2
Here is an article that describes how to share pages and user controls between applications : HOW TO: Share ASP.NET Pages and User Controls Between Applications by Using Visual Basic .NET. It’s solution depends on separate virtual directory that holds the shared files.
And in this article Scott Guthrie describes how to build reusable web assemblies. It’s solution depends on making separate assembly by shared files.
Method 3
In the second project choose “Add existing file”, select the file, click on the arrow on the add button and select “add as link”.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0