What is the best way to share MasterPages across projects

前端 未结 7 1132
别那么骄傲
别那么骄傲 2020-12-09 09:10

Suppose you have two seperate ASP.NET Web Application projects that both need to use a common MasterPage.

What\'s the best way to share the MasterPage across project

7条回答
  •  Happy的楠姐
    2020-12-09 09:16

    Supposing you can create a common repository for all your projects (a common folder in your source control tree, for example), you could add the master pages as links by using relative paths.

    However, IIRC, Visual Studio makes local copies of files added from external paths. You might have to text-edit the solution/project file to add the linked files.

    This, of course, is assuming you use "Web Application" format. Older VS "Web Sites" do not have project files and rely on having all files within the site folder.

提交回复
热议问题