如何在CCNet上设置dnx构建? dnu运行但失败,未找到" dnx"

时间:2016-03-02 14:25:56

标签: asp.net-core cruisecontrol.net dnx .net-core

我试图在CCNet上建立一些ASPNetv5版本。我添加了一个像这样的exec块:

<cb:define name="DnuPackageRestore">
    <exec>
        <executable>dnu</executable>
        <cb:ifdef name="SourceFolder">
            <baseDirectory>$(SourceFolder)</baseDirectory>
        </cb:ifdef>
        <cb:else>
            <baseDirectory>$(WorkingPath)\$(ProjectName)</baseDirectory>
        </cb:else>
        <description>DNU Package Restore</description>
        <buildArgs>restore</buildArgs>
    </exec>
</cb:define>

由于一些奇怪的原因,CCNet在PATH中的.cmd文件失败,因此我将executablednu更改为dnu.cmd。它现在运行dnu罚款,但立即崩溃说它无法找到dnx:

2016-03-02 14:17:19,073 [SuperThing:DEBUG] Starting process [dnu.cmd] in working directory [D:\CI\W\SuperThing] with arguments [restore]
2016-03-02 14:17:19,076 [SuperThing:DEBUG] Not setting PriorityClass on [D:\CI\W\SuperThing\dnu.cmd] to default Normal
2016-03-02 14:17:19,091 [13:DEBUG] [SuperThing dnu.cmd] '"D:\CI\W\SuperThing\dnx"' is not recognized as an internal or external command,
2016-03-02 14:17:19,091 [13:DEBUG] [SuperThing dnu.cmd] operable program or batch file.

它声称要在SuperThing中查找dnx,但是因为它对dnu.cmd说的相同,我认为这是一个红色的鲱鱼。

如果我将PowerShell作为同一个用户远程进入服务器,一切正常(我安装了dnvm,让它安装1.0.0-rc1-update1并运行dnvm set default -p)。

CCNet如何执行这个导致它失败的dnu.cmd似乎有点不可思议(我的猜测是PATH在哪里迷路?)。

1 个答案:

答案 0 :(得分:1)

通常,您无法使用标准Process.Start执行“.cmd”文件(不确定CCNet是否这样做)。相反,您需要使用参数z = T.dot(net.varWeights[layerNum]['w'], variable * (net.dropOutVectors[layerNum].dimshuffle(0, 'x') if self.dropout else 1.0)) + net.varWeights[layerNum]['b'].dimshuffle(0, 'x') 执行cmd。也许尝试一下,看看它是否解决了这个问题?