Ticket #371 (new defect)
MSBuild Task: error if no assembly references in .cobraproj file
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, using "msbuild.exe" with a file "X.cobraproj" without any assembly references, for example
<Reference Include="System" />
causes this error message:
...Cobra.targets(149,3): error MSB6001: Invalid command line switch for "cobra.bat". Value cannot be null. [...X.cobraproj] ...Cobra.targets(149,3): error MSB6001: Parameter name: collection [...X.cobraproj]
Steps to reproduce the failure:
call
msbuild X.cobraproj
where "X.cobraproj" is this file
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0" DefaultTargets="Build" > <PropertyGroup> <OutputPath></OutputPath> <AssemblyName>Hello</AssemblyName> <OutputType>Exe</OutputType> </PropertyGroup> <ItemGroup> <Compile Include="Hello.cobra" /> </ItemGroup> <Import Project="$(MSBuildExtensionsPath)/Cobra/Cobra.targets" /> </Project>
and "Hello.cobra" is this file:
class Program def main is shared print "Hello!"
Note:
The above "X.cobraproj" works with "xbuild.exe".
With "msbuild.exe" it only works with an assembly reference, for example:
... <ItemGroup> <Compile Include="Hello.cobra" /> <Reference Include="System" /> </ItemGroup> ...
Change History
Note: See
TracTickets for help on using
tickets.