我在同一个解决方案中有多个项目.我希望他们共享相同的connectionStrings,这样我就不必在多个地方更改它.
在我的网络配置中,我有
<connectionStrings configSource="bin/connectionStrings.config" />
Run Code Online (Sandbox Code Playgroud)
然后我添加了一个文件作为我的"connectionsStrings.config"的链接,它位于解决方案级别.
我更改了属性,以便"复制到输出目录"是"始终复制"而"构建操作"是"内容"
但是我收到以下错误:
The configSource attribute must be a relative physical path, so the '/' character is not allowed.
Run Code Online (Sandbox Code Playgroud)
我不知道如何解决这个问题,任何帮助都会很棒.
干杯
connection-string config web-config configsource visual-studio-2012