使用ccnet时,从build.xml中删除项目

时间:2012-01-13 09:54:11

标签: xml cruisecontrol.net

我收到此错误因为我正在使用ccnet而我没有在此计算机中安装VS:

NCrawler.DbServices.Db.dbproj(63,3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\TeamData\Microsoft.Data.Schema.SqlTasks.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

如何在build.xml中删除Crawler.DbServices.Db.dbproj项目?这可能。

这是我的curisecontrol的build.xml

<?xml version="1.0" encoding="utf-8" ?>

<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

    <PropertyGroup>
        <Solution>NCrawler.sln</Solution>       
    </PropertyGroup>

    <PropertyGroup Condition="!Exists('$(Configuration)')">
        <Configuration>Debug</Configuration>    
    </PropertyGroup>

    <Target Name="Build" DependsOnTargets="Clean;Compile" />

    <Target Name="Clean">
        <MSBuild Projects="$(Solution)" Properties="Configuration=$(Configuration)" Targets="Clean" />  
    </Target>

    <Target Name="Compile">
        <MSBuild Projects="$(Solution)" Properties="Configuration=$(Configuration)" />   
    </Target>

</Project>

1 个答案:

答案 0 :(得分:3)

您需要修改解决方案以指定为每个配置构建哪些项目(例如,发布/调试等)

在Visual Studio中,打开解决方案文件(NCrawler.sln)并转到构建/配置管理器... 菜单选项。然后取消选中您不希望为每个配置/平台组合构建的项目(Crawler.DbServices.Db.dbproj)。然后保存您的解决方案。