将应用设置添加到螺旋解决方案中的根 web.config 文件



我们试图弄清楚如何从螺旋功能项目将应用程序设置添加到根网站web.config中。 我的理解是,如果您将转换文件(例如 web.config.transform(添加到功能项目的根目录中并使用 helix gulp 脚本构建项目,则转换应该更新根配置。 这是对的吗? 不幸的是,当我们运行gulp脚本时,我们收到错误

[11:26:54] Starting '04-Apply-Xml-Transform'...
[11:26:55] Applying configuration transform: D:ProjectsxxxxxxxsrcFeatureClaimscodexxxxx.Website.Feature.ClaimApp_ConfigIncludeWeb.config.transform
D:Projectsxxxxxxxscriptsapplytransform.targets(14,5): error : Could not open Source file: Could not find a part of the path 'C:inetpubwwwrootxxxxxxxxxwebsitexxxxxxx.Website.Feature.ClaimApp_ConfigIncludeWeb.config'.
Process terminated with code 1.
[11:26:56] MSBuild failed with code 1!
[11:26:56] '04-Apply-Xml-Transform' errored after 1.59 s
error!
[11:26:56] Error: MSBuild failed with code 1!
at ChildProcess.<anonymous> (D:Projectsxxxxxxxxxxxxnode_modulesgulp-msbuildlibmsbuild-runner.js:66:25)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)

在我看来,它就像是在尝试更新本地 web.config。

你的 web.config 不会驻留在这里C:inetpubwwwrootxxxxxxxxxwebsitexxxxxxx.Website.Feature.ClaimApp_ConfigIncludeWeb.config

它将驻留在这里:C:inetpubwwwrootxxxxxxxxxwebsiteWeb.config

最新更新