MSBUILD在命令行创建_PublishedWebsites,但在CI服务器上不创建

MSBUILD在命令行创建_PublishedWebsites,但在CI服务器上不创建,第1张

概述我在命令行上使用MSBUILD与CruiseControl.NET有一些问题,因为结果不同,我不明白为什么会这样. 调用MSBUILD在我的本地机器上的命令行上,项目构建,输出目录包含一堆DLL和PDB文件以及一个名为_PublishedWebsites的子目录,其中包含我的解决方案中的两个Web应用程序(ASP.NET MVC应用程序和WCF Web服务). 到现在为止还挺好. 在CI服务器上, 我在命令行上使用MSBUILD与CruiseControl.NET有一些问题,因为结果不同,我不明白为什么会这样.

调用MSBUILD在我的本地机器上的命令行上,项目构建,输出目录包含一堆DLL和PDB文件以及一个名为_PublisheDWebsites的子目录,其中包含我的解决方案中的两个Web应用程序(ASP.NET MVC应用程序和WCF Web服务).

到现在为止还挺好.

在CI服务器上,未创建此文件夹.

它是用于两者的相同的msbuild项目文件,所以我看不出可能有什么区别.经过几个小时的谷歌搜索,我现在完全失去了.

我假设我的本地计算机上的环境中有一些东西设置了CI服务器上不存在的默认位置.

是否有任何特定的选项我必须设置某个地方明确告诉MSBUILD创建一个包含已发布的Web应用程序的文件夹?

更新CCNET.config(部分)

<cruisecontrol>  <!-- Other projects here -->    <project name="My-Project Nightly Build">    <workingDirectory>C:\CruiseControl\My-Project-Nightly</workingDirectory>    <artifactDirectory>C:\CruiseControlArtifacts\My-Project-Nightly</artifactDirectory>    <sourcecontrol type="multi">      <sourceControls>        <vsts>          <executable>C:\Program files\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe</executable>          <project>$/Brand Web/</project>          <autoGetSource>true</autoGetSource>          <applyLabel>true</applyLabel>          <cleancopy>true</cleancopy>          <deleteWorkspace>true</deleteWorkspace>          <server>http://company-tfs:8080/tfs/Projects</server>          <workingDirectory>C:\CruiseControl\My-Project-Nightly\Brand Web\</workingDirectory>          <workspace>Brand-Nightly</workspace>        </vsts>        <vsts>          <executable>C:\Program files\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe</executable>          <project>$/Brand/Main</project>          <autoGetSource>true</autoGetSource>          <applyLabel>true</applyLabel>          <cleancopy>false</cleancopy>          <server>http://company-tfs:8080/tfs/Projects</server>          <workingDirectory>C:\CruiseControl\My-Project-Nightly\Brand\Main</workingDirectory>          <workspace>Brand-Nightly</workspace>        </vsts>        <vsts>          <executable>C:\Program files\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe</executable>          <project>$/Generic</project>          <autoGetSource>true</autoGetSource>          <applyLabel>true</applyLabel>          <cleancopy>false</cleancopy>          <server>http://company-tfs:8080/tfs/Projects</server>          <workingDirectory>C:\CruiseControl\My-Project-Nightly\Generic</workingDirectory>          <workspace>Brand-Nightly</workspace>        </vsts>        <vsts>          <project>$/ComponentA</project>          <executable>C:\Program files\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe</executable>          <autoGetSource>true</autoGetSource>          <applyLabel>true</applyLabel>          <cleancopy>false</cleancopy>          <server>http://company-tfs:8080/tfs/Projects</server>          <workingDirectory>C:\CruiseControl\My-Project-Nightly\ComponentA</workingDirectory>          <workspace>Brand-Nightly</workspace>        </vsts>        <vsts>          <project>$/Third Party librarIEs</project>          <executable>C:\Program files\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe</executable>          <autoGetSource>true</autoGetSource>          <applyLabel>true</applyLabel>          <cleancopy>false</cleancopy>          <server>http://company-tfs:8080/tfs/Projects</server>          <workingDirectory>C:\CruiseControl\My-Project-Nightly\Third Party librarIEs</workingDirectory>          <workspace>Brand-Nightly</workspace>        </vsts>      </sourceControls>    </sourcecontrol>    <labeller type="defaultlabeller">      <prefix>Brand-</prefix>    </labeller>    <triggers>      <scheduleTrigger time="02:15" buildCondition="ForceBuild" name="BrandNightlyBuild">      </scheduleTrigger>    </triggers>    <tasks>      <msbuild>        <executable>C:\windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable>        <projectfile>C:\CruiseControl\My-Project-Nightly\Brand Web\Main\Build\Nightly.build</projectfile>        <buildArgs>/p:Configuration=DeBUG /p:Platform=x86 /p:TargetFramework=4.0 /p:OutputPath=C:\CruiseControl\My-Project-Nightly\output\</buildArgs>        <timeout >360000</timeout>      </msbuild>    </tasks>  </project></cruisecontrol>
@R_404_6120@ 我们这样做了.我们创建了两个配置文件.

第一个配置文件

<msbuild>      <executable>        C:\windows\Microsoft.NET\Framework\v3.5\MSBuild.exe      </executable>      <workingDirectory>        Project dorecotry      </workingDirectory>      <projectfile>        Path to second config file      </projectfile>      <timeout>600</timeout>      <logger>C:\Program files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>    </msbuild>

第二个配置文件将发布代码.

第二个配置文件

<Project        xmlns = "http://schemas.microsoft.com/developer/msbuild/2003"        name = "AspNetPreCompile"        DefaultTargets = "PrecompileWeb">        <Target name = "PrecompileWeb">                <AspNetCompiler                        VirtualPath = "DeployTemp"                         PhysicalPath = "Path of project file"                        TargetPath = "Path of published code"                        Force = "true"                        DeBUG = "true"                        Updateable = "true"/>        </Target></Project>

请检查blog

总结

以上是内存溢出为你收集整理的MSBUILD在命令行创建_PublishedWebsites,但在CI服务器上不创建全部内容,希望文章能够帮你解决MSBUILD在命令行创建_PublishedWebsites,但在CI服务器上不创建所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1053864.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-25
下一篇2022-05-25

发表评论

登录后才能评论

评论列表(0条)

    保存