Hi Don,
I followed the steps you recommended:
copied all PowerPack related files, which I built from sources into one directory
% ls ../../../powerpack
FSharp.Compiler.CodeDom.dll
FSharp.Compiler.CodeDom.dll.mdb
FSharp.PowerPack.Build.Tasks.dll
FSharp.PowerPack.Build.Tasks.dll.mdb
FSharp.PowerPack.Compatibility.dll
FSharp.PowerPack.Compatibility.dll.mdb
FSharp.PowerPack.dll
FSharp.PowerPack.dll.mdb
FSharp.PowerPack.Linq.dll
FSharp.PowerPack.Linq.dll.mdb
FSharp.PowerPack.Metadata.dll
FSharp.PowerPack.Metadata.dll.mdb
FSharp.PowerPack.Parallel.Seq.dll
FSharp.PowerPack.Parallel.Seq.dll.mdb
FSharp.PowerPack.targets
fslex.exe
fslex.exe.mdb
FsLex.xml
fsyacc.exe
fsyacc.exe.mdb
FsYacc.xml
and put the following lines into my fsproj
</PropertyGroup>
<PropertyGroup>
<FsSrGenToolPath>..\..\..\powerpack</FsSrGenToolPath>
<FsLexToolPath>..\..\..\powerpack</FsLexToolPath>
<FsYaccToolPath>..\..\..\powerpack</FsYaccToolPath>
<FsLexToolExe>fslex.exe</FsLexToolExe>
<FsYaccToolExe>fsyacc.exe</FsYaccToolExe>
</PropertyGroup>
<PropertyGroup>
<FsLexOutputFolder>$(IntermediateOutputPath)</FsLexOutputFolder>
<FsYaccOutputFolder>$(IntermediateOutputPath)</FsYaccOutputFolder>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath32)\FSharp\1.0\Microsoft.FSharp.Targets" Condition="!Exists('$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll')" />
<Import Project="$(MSBuildExtensionsPath32)\..\Microsoft F#\v4.0\Microsoft.FSharp.Targets" Condition="Exists('$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll')" />
<Import Project="..\..\..\powerpack\FSharp.PowerPack.targets" />
but it fails to build with the following error
No input files were specified for target GenerateSatelliteAssemblies, skipping.
Target CallFsLex:
Tool ../../../powerpack/fslex.exe execution started with arguments: -o Lexer.fs --unicode Lexer.fsl
compiling to dfas (can take a while...)
FSLEX: error FSL000: The macro difit is not defined
Task "FsLex" execution -- FAILED
This is how I refer to my source files
<ItemGroup>
<FsLex Include="Lexer.fsl">
<OtherFlags>--unicode</OtherFlags>
</FsLex>
<FsYacc Include="Parser.fsy">
<OtherFlags>--module Parser</OtherFlags>
</FsYacc>
<Compile Include="$(IntermediateOutputPath)Parser.fs">
<Visible>false</Visible>
<Link>Parser.fs</Link>
</Compile>
<Compile Include="$(IntermediateOutputPath)Lexer.fs">
<Visible>false</Visible>
<Link>Lexer.fs</Link>
</Compile>
<Compile Include="Ast.fs" />
<Compile Include="Program.fs" />
</ItemGroup>
Are there any other steps required?
Thanks,
Andrew