【问题标题】:Adding an appsetting to the root web.config file in a helix solution将 appsetting 添加到 helix 解决方案中的根 web.config 文件
【发布时间】:2018-10-05 10:34:19
【问题描述】:

我们正在尝试找出如何从 helix 功能项目中将 appsetting 添加到根网站 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。

【问题讨论】:

  • 您的项目中是否有损坏的配置转换文件引用?从项目链接但在您的驱动器上丢失的文件?

标签: sitecore helix


【解决方案1】:

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

它将驻留在此处:C:\inetpub\wwwroot\xxxxxxxxx\website\Web.config

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-06-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多