是否有可能要共享多个项目在web.config中的解决方案?(ASP.NET)

编程入门 行业动态 更新时间:2024-10-28 18:25:52
本文介绍了是否有可能要共享多个项目在web.config中的解决方案?(ASP.NET)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个Web应用程序和多个项目组成的解决方案,是有可能在所有的解决方案,分享在Web应用程序的配置?

I have a solution composed of a web application and multiple projects, is it possible to share the configuration in the web application across all the solution?

感谢

推荐答案

我看起来是可能的,你可以尝试以下操作:

I looks like it is possible, you can try following:

您可以复制你的的web.config 文件到您的解决方案的根文件夹。然后创建解决方案文件夹(不属于任何你的项目),并添加您的文件有(通过添加现有项弹出菜单项)。从您的网站删除网页CONFIGS。之后,你可以选择添加现有项从您的两个Web项目的弹出菜单,从解决方案根中选择你的web.config文件,然后点击添加链接。之后,你将在你的解决方案链接到你的网络配置文件,而不是以假乱真。

You can copy your web.config file to the root folder of your solution. Then create solution folder (which does not belong to any of your projects) and add your file there (via Add Existing Item popup menu item). Delete web configs from your web sites. After that you can select Add Existing Item from popup menu on your both web projects, select your web.config file from the solution root and click Add As Link. After that you will have links to your web config files instead of real ones in your solution.

在另一方面,我不知道,如果不同项目之间的web.config文件的共享是一个好主意,因为通常web.config中为每个单独的应用程序的一些具体condifuration。

On the other hand I'm not sure if sharing of the web.config files among different projects is a good idea, because usually web.config has some specific condifuration for each separate application.

更多推荐

是否有可能要共享多个项目在web.config中的解决方案?(ASP.NET)

本文发布于:2023-11-06 22:15:31,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1564817.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:多个   有可能   解决方案   项目   web

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!