Closed apobekiaris closed 9 years ago
Hi, could you paste a sample of how you are using the task
sure but it happens anywhere
<MSBuild.ExtensionPack.Framework.CommandLine ContinueOnError="false" Command="$(NuGetTool) pack %(NuspecFile.Identity) -BasePath $(MSBuildProjectDirectory) -OutputDirectory $(BuildPath)\NuGet -Version $(Version) -Symbols"/>
MSBuild.ExtensionPack.Framework.CommandLine ContinueOnError="false" Command="$(NuGetTool) pack %(NuspecFile.Identity) -BasePath $(MSBuildProjectDirectory) -OutputDirectory $(BuildPath)\NuGet -Version $(Version) -Symbols"/>
HI Mike
any ideas on my issue?
Can you give me the output of /v:diag, I'm after something like
Using "MSBuild.ExtensionPack.Framework.CommandLine" task from assembly "C:\Prog ram Files (x86)\MSBuild\ExtensionPack\4.0\MSBuild.ExtensionPack.dll". Task "MSBuild.ExtensionPack.Framework.CommandLine" (TaskId:2) Task Parameter:Command=calc.exe (TaskId:2) Warning RegEx: (?i:\bwarning\b) (TaskId:2) Error RegEx: (?i:\berror\b) (TaskId:2) Command: calc.exe (TaskId:2) Execute: calc.exe (TaskId:2)
It could be that the tool isn't in the Path and you need to specify the WorkingDirectory
Mike
Hi, any luck with /v:diag? is this still an issue?
Mike
Yes it is an issue and the v/diag does not give any valueable info
Using "MSBuild.ExtensionPack.Framework.CommandLine" task from assembly "C:\eXpandFrameWork\eXpand\Resource\Build\ExtensionPack\MSBuild.ExtensionPack.dll".
Task "MSBuild.ExtensionPack.Framework.CommandLine"
Task Parameter:Command=githublink.exe C:\eXpandFrameWork\eXpand -u https://github.com/eXpand/eXpand -b master -l link.log -g true
Task Parameter:WorkingDirectory=C:\eXpandFrameWork\eXpand_third_party_assemblies
Warning RegEx: (?i:\bwarning\b)
Error RegEx: (?i:\berror\b)
Command: githublink.exe C:\eXpandFrameWork\eXpand -u https://github.com/eXpand/eXpand -b master -l link.log -g true
Execute: githublink.exe C:\eXpandFrameWork\eXpand -u https://github.com/eXpand/eXpand -b master -l link.log -g true
C:\eXpandFrameWork\eXpand\Xpand.build(391,5): warning MSB4018: The "MSBuild.ExtensionPack.Framework.CommandLine" task failed unexpectedly.\r
C:\eXpandFrameWork\eXpand\Xpand.build(391,5): warning MSB4018: System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified\r
C:\eXpandFrameWork\eXpand\Xpand.build(391,5): warning MSB4018: at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)\r
C:\eXpandFrameWork\eXpand\Xpand.build(391,5): warning MSB4018: at System.Diagnostics.Process.Start()\r
C:\eXpandFrameWork\eXpand\Xpand.build(391,5): warning MSB4018: at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)\r
C:\eXpandFrameWork\eXpand\Xpand.build(391,5): warning MSB4018: at MSBuild.ExtensionPack.Framework.CommandLine.Execute()\r
C:\eXpandFrameWork\eXpand\Xpand.build(391,5): warning MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()\r
C:\eXpandFrameWork\eXpand\Xpand.build(391,5): warning MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.
Can you try the following?
The above throws and I think that I followed were very logical. Can you comment?
Ok I just took a look at the code. The task runs with UseShellExecute set as false do the workingdirectory property only specifies where the command will run from, not where to find it. To resolve this you can add the exe to your Path or fully qualify the path to it in your call.
Exec has no issues but when i switch to CommandLine i get
"C:\eXpandFrameWork\eXpand\Xpand.build" (nuget target) (1) -> (NuGetPackage target) -> C:\eXpandFrameWork\eXpand\Xpand.build(394,2): error MSB4018: The "MSBuild.Ext ensionPack.Framework.CommandLine" task failed unexpectedly.\r C:\eXpandFrameWork\eXpand\Xpand.build(394,2): error MSB4018: System.ComponentMo del.Win32Exception (0x80004005): The system cannot find the file specified\r C:\eXpandFrameWork\eXpand\Xpand.build(394,2): error MSB4018: at System.Diagn ostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)\r C:\eXpandFrameWork\eXpand\Xpand.build(394,2): error MSB4018: at System.Diagn ostics.Process.Start()\r C:\eXpandFrameWork\eXpand\Xpand.build(394,2): error MSB4018: at System.Diagn ostics.Process.Start(ProcessStartInfo startInfo)\r C:\eXpandFrameWork\eXpand\Xpand.build(394,2): error MSB4018: at MSBuild.Exte nsionPack.Framework.CommandLine.Execute() in C:\Projects\CodePlex\MSBuildExtens ionPack\Solutions\Main\Framework\Framework\CommandLine.cs:line 292\r C:\eXpandFrameWork\eXpand\Xpand.build(394,2): error MSB4018: at Microsoft.Bu ild.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execut e()\r C:\eXpandFrameWork\eXpand\Xpand.build(394,2): error MSB4018: at Microsoft.Bu ild.BackEnd.TaskBuilder.d__20.MoveNext()