MSBUILD在命令行而不是CI服务器上创建_PublishedWebsites

MSBUILD在命令行而不是CI服务器上创建_PublishedWebsites,msbuild,cruisecontrol.net,web-deployment,Msbuild,Cruisecontrol.net,Web Deployment,我在命令行与CruiseControl.NET上使用MSBUILD时遇到了一些问题,因为结果不同,我不明白为什么会这样 在本地计算机上的命令行上调用MSBUILD时,将生成项目,输出目录包含一组DLL和PDB文件以及一个名为_PublishedWebsites的子目录,其中包含解决方案中的两个web应用程序(ASP.NET MVC应用程序和WCF web服务) 到目前为止还不错 在CI服务器上,未创建此文件夹 两者使用的是同一个msbuild项目文件,因此我看不出可能有什么区别。谷歌搜索了几个小

我在命令行与CruiseControl.NET上使用MSBUILD时遇到了一些问题,因为结果不同,我不明白为什么会这样

在本地计算机上的命令行上调用MSBUILD时,将生成项目,输出目录包含一组DLL和PDB文件以及一个名为_PublishedWebsites的子目录,其中包含解决方案中的两个web应用程序(ASP.NET MVC应用程序和WCF web服务)

到目前为止还不错

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

两者使用的是同一个msbuild项目文件,因此我看不出可能有什么区别。谷歌搜索了几个小时后,我现在完全不知所措

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

是否必须在某个位置设置任何特定选项,以明确告诉MSBUILD创建包含已发布web应用程序的文件夹

更新CCNET.config(部分)


C:\CruiseControl\My Project Nightly
C:\CruiseControl\My Project Nightly
C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe
美元/品牌网站/
真的
真的
真的
真的
http://company-tfs:8080/tfs/Projects
C:\CruiseControl\My Project Nightly\Brand Web\
夜间品牌
C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe
$/品牌/主要
真的
真的
假的
http://company-tfs:8080/tfs/Projects
C:\CruiseControl\My Project Nightly\Brand\Main
夜间品牌
C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe
美元/通用
真的
真的
假的
http://company-tfs:8080/tfs/Projects
C:\CruiseControl\My Project Nightly\Generic
夜间品牌
$/组件a
C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe
真的
真的
假的
http://company-tfs:8080/tfs/Projects
C:\CruiseControl\My Project Nightly\ComponentA
夜间品牌
$/第三方库
C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe
真的
真的
假的
http://company-tfs:8080/tfs/Projects
C:\CruiseControl\My Project Nightly\Third Party Library
夜间品牌
烙印-
C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
C:\CruiseControl\My Project Nightly\Brand Web\Main\Build\Nightly.Build
/p:Configuration=Debug/p:Platform=x86/p:TargetFramework=4.0/p:OutputPath=C:\CruiseControl\My Project Nightly\output\
360000

我们就是这样做的。我们创建了两个配置文件

第一个配置文件

<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> 

C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe
dorecotry项目
第二个配置文件的路径
600
C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll
第二个配置文件将发布代码

第二个配置文件

<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> 


你能发布ci配置文件吗?我已经用部分CCNET.config文件更新了这个问题(我们有很多项目)你能发布Nightly.build吗。我认为在这个文件中,您正在发布代码为什么需要两个CruiseControl配置?我昨天还尝试了AspNetCompiler MSBUILD任务,但由于未在CI服务器上正确设置IIS,因此出现了一个错误。实际上,在第一个配置文件中,我们正在执行许多操作,例如提取最新代码。生成它,然后为源代码监视器执行一些文件,web配置编辑等。因此,我们使用上述设置将项目发布分离到其他配置文件try AspNetPreCompile中。正确给出物理路径。