在螺旋解决方案中向根web.config文件添加一个appsetting

时间:2018-10-05 10:34:20

标签: sitecore helix

我们正在尝试找出如何从螺旋功能项目向根网站web.config添加应用程序设置。我的理解是,如果您将一个转换文件(例如(web.config.transform))添加到功能项目的根目录并使用helix gulp脚本构建该项目,则该转换应更新根目录配置。它是否正确?不幸的是,当我们运行gulp脚本时,会收到错误消息

    [11:26:54] Starting '04-Apply-Xml-Transform'...
[11:26:55] Applying configuration transform: D:\Projects\xxxxxxx\src\Feature\Claims\code\xxxxx.Website.Feature.Claim\App_Config\Include\Web.config.transform
D:\Projects\xxxxxxx\scripts\applytransform.targets(14,5): error : Could not open Source file: Could not find a part of the path 'C:\inetpub\wwwroot\xxxxxxxxx\website\xxxxxxx.Website.Feature.Claim\App_Config\Include\Web.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:\Projects\xxxxxxxxxxxx\node_modules\gulp-msbuild\lib\msbuild-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。

1 个答案:

答案 0 :(得分:0)

您的web.config不会驻留在C:\inetpub\wwwroot\xxxxxxxxx\website\xxxxxxx.Website.Feature.Claim\App_Config\Include\Web.config

它将驻留在这里:C:\inetpub\wwwroot\xxxxxxxxx\website\Web.config

相关问题