Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的代码分为网站,每个模块一个(在 TFS 中)。此外,我有一些应用程序级代码(如 loginpage.aspx、webconfig.xml、Configuration.xml、Common.css、Logo.gif、masterpage.js、mainmaster.master、mainmaster.master.cs 等),这对于所有模块级网站。有没有办法可以引用每个模块级网站中的通用应用程序级文件。我想通过使用引用或其他一些机制来避免应用程序级代码的多个副本。
处理这种共享代码的最佳方法是在您的解决方案结构中,因此 TFS 可以保持简单,并且您的公共代码也不会在本地重复。
因此,尝试通过创建一个项目来共享公共代码,该项目提供其他项目(网站)可以构建的基类。