编辑.csproj文件 [英] Editing the .csproj file
本文介绍了编辑.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 /> <Target Name="UpdateBuildNo"> <UpdateBuildNoTask Condition="Exists('
(UpdateBuildNoAssemblyPath)')" BuildNoFilePath="
这篇关于编辑.csproj文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文