[英]msbuild/csproj exec task problem
我在使用msbuild的構建服務器(2003)上遇到問題。 我已將問題縮小到csproj文件中的exec任務,我將該文件提取到一個非常簡單的csproj(如下)中,但仍然不高興,請參見“ C:\\ Documents”錯誤。 所有這些在我的本地計算機上都沒有問題。
我認為環境變量存在一些問題,但我無法弄清楚。 有什么建議嗎?
輸入
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="BeforeBuild">
<Exec Command="echo hello world" />
</Target>
</Project>
MSBuild輸出
D:\cc.net working\source\WebBase>msbuild ExecIssue.csproj Microsoft (R) Build Engine Version 4.0.30319.1 [Microsoft .NET Framework, Version 4.0.30319.1] Copyright (C) Microsoft Corporation 2007. All rights reserved. Build started 11/10/2010 12:37:50. Project "D:\cc.net working\source\WebBase\ExecIssue.csproj" on node 1 (default t argets). BeforeBuild: echo hello world 'C:\Documents' is not recognized as an internal or external command, operable program or batch file. D:\cc.net working\source\WebBase\ExecIssue.csproj(5,4): error MSB3073: The comma nd "echo hello world" exited with code 1. Done Building Project "D:\cc.net working\source\WebBase\ExecIssue.csproj" (defau lt targets) -- FAILED. Build FAILED. "D:\cc.net working\source\WebBase\ExecIssue.csproj" (default target) (1) -> (BeforeBuild target) -> D:\cc.net working\source\WebBase\ExecIssue.csproj(5,4): error MSB3073: The com mand "echo hello world" exited with code 1. 0 Warning(s) 1 Error(s) Time Elapsed 00:00:00.17
我將以診斷模式運行它並將其發送到文件,然后在該文件中搜索C:\\ Documents。 也許它在某些路徑參數中使用了“ C:\\ Documents and settings \\”而沒有引用它。 診斷模式將打印出大部分(如果不是全部)正在使用的屬性,項目組,環境變量等。 希望它會打印出exec任務正在使用的所有屬性,因為您只提供了命令參數,其余部分使用了一些默認值。
msbuild ExecIssue.csproj /v:Diagnostic > buildout.txt
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.