I'm trying to build a Windows Workflow (WF) project using NAnt, but it doesn;t seem to be able to build the ".xoml" and ".rules" files.
Here is the code of the csc task that I'm using:
<csc debug="${build.Debug}" warninglevel="${build.WarningLevel}" target="library" output="${path::combine(build.OutputDir,assembly.Name+'.dll')}" verbose="${build.Verbose}" doc="${path::combine(build.OutputDir,assembly.Name+'.xml')}">
<sources basedir="${assembly.BaseDir}">
<include name="**/*.cs" />
<include name="**/*.xoml" />
<include name="**/*.rules" />
</sources>
<resources basedir="${assembly.BaseDir}">
<include name="**/*.xsd" />
<include name="**/*.resx" />
</resources>
<references>
...
</references>
</csc>
Here's the output:
Compiling 21 files to 'c:\Output\MyWorkFlowProject.dll'.
[csc] c:\Projects\MyWorkFlowProject\AProcessFlow.xoml(1,1): error CS0116: A namespace does not directly contain members such as fields or methods
[csc] c:\Projects\MyWorkFlowProject\BProcessFlow.xoml(1,1): error CS0116: A namespace does not directly contain members such as fields or methods
[csc] c:\Projects\MyWorkFlowProject\CProcessFlow.rules(1,1): error CS0116: A namespace does not directly contain members such as fields or methods
[csc] c:\Projects\MyWorkFlowProject\CProcessFlow.xoml(1,1): error CS0116: A namespace does not directly contain members such as fields or methods