编辑.csproj文件 [英] Editing the .csproj file

查看:85
本文介绍了编辑.csproj文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试编辑.csproj文件.
我在其中添加了以下代码块:

 <   PropertyGroup  > ; 
    <   UpdateBuildNoAssemblyPath  >  D:\ CustomBuildTasks \ UpdateBuildNoTask.dll <  /UpdateBuildNoAssemblyPath  > 
    <   BuildNoFilePath  >  $(SolutionDir )\ BuildNumber.txt <  /BuildNoFilePath  > 
  <  /PropertyGroup  > 
  <   UsingTask     ="   UpdateBuildNoTask"  AssemblyFile    $(UpdateBuildNoAssemblyPath )" / <  目标    ="   UpdateBuildNo" <   UpdateBuildNoTask     ="   Exists('$(UpdateBuildNoAssemblyPath)')"    BuildNoFilePath   ="    / <  /Target  > 
  <!-  导入MSBuildCommunityTask目标 ->  
  <  导入    ="   $(MSBuildExtensionsPath)\ MSBuildCommunityTasks \ MSBuild.Community.Tasks.Targets " / <!-  到AssemblyInfo以包含svn修订版号 ->  
  <  目标    ="   BeforeBuild" <   SvnVersion     ="   $(MSBuildProjectDirectory)" 条件  存在('D:\ Program Files(x86)\ CollabNet Subversion Server \ svn.exe')" 工具路径  ="  > 
      <  输出    ="  修订版"  PropertyName   修订"   / > 
    <  /SvnVersion  > 
    <   FileUpdate     ="   $(Revision)!=''"   文件  ="   regex   (\ d +)\.(\ d +)\.(\ d +)\.(\ d +)"    ReplacementText   ="  $ 1. $ 2. $ 3.$(修订版)" / <   CallTarget     ="   UpdateBuildNo" / <  /Target  >  



巡航控制系统给我这个错误:
< message>完成的建筑项目"d:\ build \ projName.WebApp.csproj"(打包目标)-失败.;

我不知道出了什么问题.

解决方案

(SolutionDir)\ BuildNumber.txt < /BuildNoFilePath > < /PropertyGroup > < UsingTask =" UpdateBuildNoTask" AssemblyFile

(UpdateBuildNoAssemblyPath)" / < 目标 =" UpdateBuildNo" < UpdateBuildNoTask =" 存在('


(UpdateBuildNoAssemblyPath)')" BuildNoFilePath <PropertyGroup> <UpdateBuildNoAssemblyPath>D:\CustomBuildTasks\UpdateBuildNoTask.dll</UpdateBuildNoAssemblyPath> <BuildNoFilePath>$(SolutionDir)\BuildNumber.txt</BuildNoFilePath> </PropertyGroup> <UsingTask TaskName="UpdateBuildNoTask" AssemblyFile="$(UpdateBuildNoAssemblyPath)" /> <Target Name="UpdateBuildNo"> <UpdateBuildNoTask Condition="Exists('$(UpdateBuildNoAssemblyPath)')" BuildNoFilePath="$(BuildNoFilePath)" /> </Target> <!-- Import of the MSBuildCommunityTask targets --> <Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" /> <!-- to AssemblyInfo to include svn revision number --> <Target Name="BeforeBuild"> <SvnVersion LocalPath="$(MSBuildProjectDirectory)" Condition="Exists('D:\Program Files (x86)\CollabNet Subversion Server\svn.exe')" ToolPath="D:\Program Files (x86)\CollabNet Subversion Server"> <Output TaskParameter="Revision" PropertyName="Revision" /> </SvnVersion> <FileUpdate Condition="$(Revision)!=''" Files="Properties\AssemblyInfo.cs" Regex="(\d+)\.(\d+)\.(\d+)\.(\d+)" ReplacementText="$1.$2.$3.$(Revision)" /> <CallTarget Targets="UpdateBuildNo" /> </Target>



The cruise control gives me this error:
<message>Done Building Project "d:\build\projName.WebApp.csproj" (Package target(s)) -- FAILED.;

I have no clue what is wrong.

解决方案

(SolutionDir)\BuildNumber.txt</BuildNoFilePath> </PropertyGroup> <UsingTask TaskName="UpdateBuildNoTask" AssemblyFile="


(UpdateBuildNoAssemblyPath)" /> <Target Name="UpdateBuildNo"> <UpdateBuildNoTask Condition="Exists('


(UpdateBuildNoAssemblyPath)')" BuildNoFilePath="


这篇关于编辑.csproj文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆