【问题标题】:windsor.xml file of a website does not transform on CI server网站的 windsor.xml 文件不会在 CI 服务器上进行转换
【发布时间】:2013-03-12 10:16:48
【问题描述】:

我的解决方案有一个 webproject 和 windows 服务。

网站有一个 web.config 和一个 windsor.xml,服务有一个 app.config 和一个 windsor.xml 文件,它们会随每个环境(测试、UAT、LIVE)而变化。

我可以在我的 PC 上本地预览网站和 Windows 服务的转换(对于 web.cofig、app.config 和 windsor.xml)。

当我在本地构建/重建/发布文件时,转换也有效。

但是,当我在 CI 服务器上运行时,服务的 windsor.xml、appconfig 已转换,但网站并未对其 windsor.xml 进行转换(尽管 web.config 已转换)。

我错过了什么吗?

【问题讨论】:

    标签: castle-windsor slowcheetah xml-document-transform


    【解决方案1】:

    据我记得,您可能还必须在服务器上安装/拥有 slowcheetah。同时编辑引用慢猎豹的prj文件:

    <PropertyGroup>
    <SlowCheetahTargets Condition=" '$(SlowCheetahTargets)'=='' ">$(LOCALAPPDATA)\Microsoft\MSBuild\SlowCheetah\v1\SlowCheetah.Transforms.targets</SlowCheetahTargets>
    </PropertyGroup>
    
    ...
    <Import Project="$(SlowCheetahTargets)" Condition="Exists('$(SlowCheetahTargets)')" />
    

    【讨论】:

    • 是的。我在 CI 服务器上有 slowcheetah。我还创建了一个项目文件夹,其中包含解决方案的目标(slowcheetah)。我没有使用 LocalAppdata(根据您的建议),而是使用了项目参考。即使这个解决方案也不起作用。
    猜你喜欢
    • 2012-05-05
    • 2013-03-15
    • 2012-05-17
    • 2021-08-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多