Ticket #372 (new defect)
MSBuild Task: a file "cobra" in the project directory causes and error on Windows.
Reported by: | thriwkin | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | Cobra Compiler | Version: | 0.9.6 |
Keywords: | MSBuild Task, Cobra.MSBuild.dll | Cc: |
Description
- On Windows,
- running "msbuild.exe" or "xbuild.exe" fails
- with a correct "X.cobraproj" and
- a file "cobra" in the same directory or in a subdirectory "bin".
msbuild /t:Rebuild X.cobraproj ==> ...Cobra.targets(149,3): error MSB6003: The specified task executable "cobra" could not be run. The specified executable is not a valid application for this OS platform. [...X.cobraproj]
xbuild /t:Rebuild X.cobraproj ==> ...Cobra.targets: error : Error executing tool '...cobra': ApplicationName='...cobra', CommandLine=... CurrentDirectory=... Native error= %1 is not a valid Win32 application.
Reproduction:
An example of this scenario:
The directory "Source" of the Cobra compiler source (svn-3116)
contains
- the "cobra.cobraproj" file
- and the file "cobra", a bash script.
A "Rebuild" command, given in the Cobra IDE or on the commandline
msbuild /t:Rebuild cobra.cobraproj
produces 2 failures:
First it fails because the .cobraproj file does not contain any assembly reference
-- see ticket:371
After having inserted an assembly reference,
it fails because the directory of the "cobra.cobraproj" file contains the file "cobra".
Moving the file "cobra" into a subdirectory "bin" does not help.
After having renamed this file, e.g to "(cobra)", all works well.