跨多个应用程序的ASP.Net共享母版页,Js,Css [英] ASP.Net Share Master Pages, Js, Css across multiple applications
问题描述
好的,所以我有几个ASP.Net Mvc Web应用程序,我想在它们之间共享一个通用的母版页,一些css和js文件...
Okay, so I have a couple of ASP.Net Mvc web applications that I would like to share a common master page, some css and js files across...
我尝试为文件创建一个通用存储库,然后在Studio项目中使用添加现有...作为链接..."功能,但这似乎不起作用...
I tried creating a common repository for the files and then in my studio projects using the Add Existing... As Link... feature but, this doesn't appear to work...
当我尝试调试项目时,出现错误,指出找不到母版页.这是因为它实际上不在我创建链接的位置...
When I try and debug the project I get an error stating the master page cannot be found. Which is because it doesn't physically exist in the location where I created the link...
有没有人让它起作用,或者对如何共享这些类型的通用文件还有其他建议...
Has anyone gotten this to work or perhaps have another suggestion on how to share these types of common files...
谢谢..
推荐答案
如果您使用的是诸如SVN之类的源代码控制系统,则可以将母版页保留在一个存储库中,并使用
If you're using a source control system like SVN, you could keep your master page in one repository and reference that repository with a svn:externals property in your project repositories.
如果每个项目都需要另一个项目不需要的修改,则可以分支母版页,同时仍保持合并原始项目中所做更改的能力.
You could then branch the master page if each project required a modification that the other did not, while still maintaining the ability to merge changes made in the original.
这篇关于跨多个应用程序的ASP.Net共享母版页,Js,Css的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!